How to Parse Facebook Data

前端 未结 2 1669
星月不相逢
星月不相逢 2021-01-14 23:29

I am having a few problems getting Facebook data to parse properly.

I am working on implementing part of an application to allow a user to select and use one of thei

2条回答
  •  春和景丽
    2021-01-15 00:32

    The new Android Facebook SDK 3.0 returns a Response object in the Response.Callback() listener when making Graph API calls. This response object can be used to create a GraphObject which can be used to get a JSON...ex:

    Request graphRequest = Request.newGraphPathRequest(session, graphRequestString, new Request.Callback() {
    
            @Override
            public void onCompleted(Response response) {
                //Create the GraphObject from the response
                GraphObject responseGraphObject = response.getGraphObject();
    
               //Create the JSON object
               JSONObject json = responseGraphObject.getInnerJSONObject();
    
            }
    });
    

提交回复
热议问题