Guest User

Untitled

a guest
May 23rd, 2018
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1. new GraphRequest(
  2. AccessToken.getCurrentAccessToken(), "me?fields=friends,name", null, HttpMethod.GET,
  3. new GraphRequest.Callback() {
  4. public void onCompleted(GraphResponse response) {
  5.  
  6. JSONObject object = response.getJSONObject();
  7. try {
  8. friends = object.getJSONObject("friends").getJSONObject("summary").getString("total_count");
  9. } catch (JSONException e) {
  10. e.printStackTrace();
  11. };
  12.  
  13. }
  14. }
  15. ).executeAsync();
  16.  
  17. return friends;
  18.  
  19. }
Add Comment
Please, Sign In to add comment