The Graph API is the main way to get data to and from Facebook's social graph. This is a low-level HTTP interface that you can use to request data, publish new stories, upload photos and other tasks that the application may require. This guide will teach you how to complete all these steps in the graphical API.
new GraphRequest( AccessToken.getCurrentAccessToken(), "/me", null, HttpMethod.GET, new GraphRequest.Callback() { public void onCompleted(GraphResponse response) { System.out.println("Response::" + String.valueOf(response.getJSONObject())); } } ).executeAsync();
Here
AccessToken.getCurrentAccessToken () → User Access Token
/ me → Information about your own developer profile
here the identifier / username / page is also used to get this information for example: / joshuatreemusicfestival / posts /
null → here the parameters of the actual receipt of the type of user / page information, such as:
Bundle param = new Bundle(); param.putString("fields", "message,created_time,id,full_picture,status_type,source,comments.summary(true),likes.summary(true)");
param replace null
HttpMethod.GET → The request method [GET, POST, DELETE]
Finally onCompleted () call and get the answer you want ... !!!
For reference
source share