Facebook: get user thumb img URL upon connecting to the app
How do I get user's profile photo URL upon connecting to my App? Not a big photo, but some sort of profile picture which would display only face photo of the user. (like the one is displayed next to the comment entry in Facebook开发者_如何转开发 comments)
Once connected to your app, all you need is to grab their user id. You can get this by calling https://graph.facebook.com/me (or parsing the access_token Facebook gave you). To get the users friends photos, you will want to access /me/friends and grab the id's. The image you are most likely looking for is this one, as it is their face and always a small squre:
https://graph.facebook.com/4/picture?type=square
The other images will all be variable sizes across users:
https://graph.facebook.com/4/picture?type=small
https://graph.facebook.com/4/picture?type=normal
https://graph.facebook.com/4/picture?type=large
Have you tried https://graph.facebook.com/[PROFILE_ID]/picture?
Check out doc here https://developers.facebook.com/docs/reference/api/
精彩评论