0

I provide a Facebook login button on my website. I'm querying Facebook api v2.8 and try to access a user's picture, age_range and cover profile fields, which should be provided in the default public_profile object: https://developers.facebook.com/docs/facebook-login/permissions/

When connecting to my Facebook app I'm using this in my URL to determine scope: This works fine (but does not return picture,age_range,cover fields):

https://www.facebook.com/v2.8/dialog/oauth?client_id=<MYCLIENTID>&redirect_uri=https://www.example.com/login.aspx?loggedin=true&scope=email

But I'm getting only this returned:

{"id":"734565845333","email":"flo\u0040outlook.com","first_name":"Flo","gender":"male","last_name":"Unknown","link":"https:\/\/www.facebook.com\/app_scoped_user_id\/734565845333\/","locale":"en_US","name":"Flo Unknown","timezone":5,"updated_time":"2017-04-30T10:46:29+0000","verified":true}

I checked here: Satellizer Facebook login not returning the right scope and here Facebook JS SDK's FB.api('/me') method doesn't return the fields i expect in Graph API v2.4+, where it's suggested to add the fields to the scope, but when I try:

&scope=email,picture,age_range,cover,public_profile or &scope=email,picture,age_range,cover Facebook returns a 500 error.

e.g.:

https://www.facebook.com/v2.8/dialog/oauth?client_id=<MYCLIENTID>&redirect_uri=https://www.example.com/login.aspx?loggedin=true&scope=email,picture,age_range,cover

Why are the other fields not returned?

Community
  • 1
  • 1
Adam
  • 6,041
  • 36
  • 120
  • 208
  • Show what API request you are making, and how you are asking for the fields. – CBroe May 02 '17 at 08:31
  • I've added the full API calls, HTH! – Adam May 02 '17 at 12:21
  • That is the login dialog call. I meant the API call where you actually request the user’s information. – CBroe May 02 '17 at 12:23
  • Ah thanks! That helped me find out that the scope parameters were not actually appended to the call to graph.facebook.com! Thanks! – Adam May 02 '17 at 13:05

0 Answers0