Skip to content

Instantly share code, notes, and snippets.

@ziginsider
Last active November 20, 2017 13:27
Show Gist options
  • Save ziginsider/aa36769010d2de0ecb32d6421e5e8acf to your computer and use it in GitHub Desktop.
Save ziginsider/aa36769010d2de0ecb32d6421e5e8acf to your computer and use it in GitHub Desktop.
...
// If already login
if (AccessToken.getCurrentAccessToken() != null) {
//Just set User ID
GraphRequest request = GraphRequest.newMeRequest(AccessToken.getCurrentAccessToken(), new GraphRequest.GraphJSONObjectCallback() {
@Override
public void onCompleted(JSONObject object, GraphResponse response) {
getData(object);
}
});
//Request Graph API
Bundle parameters = new Bundle();
parameters.putString("fields", "id, email, location, birthday, friends");
request.setParameters(parameters);
request.executeAsync();
}
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment