-1

After initiating the Facebook login process, i call loginResult.getAccessToken().getToken() to retrieve the user's access token for the current session.

I want to use the returned access token in a Graph API call to retrieve the user's information such as public profile to help in oauth authentication flow.

The problem is that when I test the returned access token with Graph API, all i get is the user's name and user's id. But if i test using the Graph API Explorer, the access token it returns gives much more information than just the name and id.

Is there any extra permission I need to ask of the Facebook login so as to get an access token that returns more data?

Alex Kombo
  • 3,256
  • 8
  • 34
  • 67

1 Answers1

1

You need to specify the fields you want to get, it´s called "Declarative Fields": /me?fields=name,email,...

If you don´t specify the fields, you will only get id and name. And of course you need to make sure to authorize with the correct permissions.

andyrandy
  • 72,880
  • 8
  • 113
  • 130