0

Since the graph API v2.0 has been introduced, apps using this API don't get the user's real facebook ID, but rather something called app-scoped id (or something like that...). In the past, using the user's fb id I was able to easily retrieve their 50x50 profile image, but with the scoped id, the path "graph.facebook.com/USER_ID/picture" returns an error (if I use the scoped id as user_id).

Is there any way to get the url to the user's image in a way similar to what we could do before?

Luoruize
  • 579
  • 2
  • 7
  • 25
  • What the error? The call you listed `graph.facebook.com/USER_ID/picture` redirects to a 50x50 jpeg of the user. I used my own id, a friends id, and a random user I found with no connections to me. – Frank D Nov 12 '14 at 14:49
  • If you put your real facebook ID, then you're right - it'll work. However, I'm using the FB SDK on my own website. If a user logs in using facebook, **I don't get their real facebook ID**. I only get what is called a app-scoped id, with which I cannot retrieve the picture. – Luoruize Nov 12 '14 at 16:31
  • Not sure if this still functions but there seems to be a way to get the their real id. http://stackoverflow.com/questions/23805866/get-facebook-user-id-from-app-scoped-user-id – Frank D Nov 12 '14 at 16:36

1 Answers1

1

Just specify with type

/APP_SCOPED_ID/picture?type=large

You should not be trying to find the Global ID, that defeats the purpose of the app scoped ID introduction.

phwd
  • 19,975
  • 5
  • 50
  • 78
  • Seems to be working... It's a little weird, because it works now even without specifying the type... – Luoruize Nov 13 '14 at 16:14