Facebook GUI API field extension for Android app

Is field extension supported in the Android Android SDK? where can i find an example?

There is excellent documentation on extending the field for Graph APi. However, I can not find the documentation for android-sdk-3. Is it supported?

The problem starts when you want to do the following:

/me?fields=name,birthday,photos.limit(10).fields(id, picture)

In Android android SDK SDK, it seems that adding parameters as a string does not work

eg.

request = Request.newGraphPathRequest(session, "me/friendlists", new Request.Callback() {
    public void onCompleted(Response response) ...
}
Bundle parameters = new Bundle();
parameters.putString("fields","members.fields(id)", "list_type");
request.setParameters(parameters);
+5
source share
2 answers
Session session = Session.getActiveSession();
    Bundle parameters = new Bundle(); 
    parameters.putString("fields","picture,description,source"); 
    new Request(session, /me/videos/uploaded, parameters, HttpMethod.GET,
            new Request.Callback() {
                public void onCompleted(Response response) {
                    GraphObject responseGraphObject = response
                            .getGraphObject();
                    JSONObject json = responseGraphObject
                            .getInnerJSONObject();
                    try {
                        JSONArray array = json.getJSONArray("data");
                        for (int i = 0; i < array.length(); i++) {
                            JSONObject main = array.getJSONObject(i);
                            String surce = main.optString("source");

                            String picture = main.optString("picture");

                            String videoname = main
                                    .optString("description");
                            System.out.println(surce);

                        }
                    } catch (JSONException e) {
                        e.printStackTrace();
                    }
                }
            }).executeAsync();

* get video data from faecbook according to the api schedule, and also put the string in the package *

+7
source

Android SDK used to create requests for Graphic APIs

API , HTTP- graph.facebook.com Graph API Explorer -

API, , , Field Expansion. /me/friends, /me/friends?fields=name,birthday

+1

All Articles