Last active
November 20, 2017 13:27
-
-
Save ziginsider/aa36769010d2de0ecb32d6421e5e8acf to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
... | |
// 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