开发者

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

Facebook: get user thumb img URL upon connecting to the app

The other images will all be variable sizes across users:

https://graph.facebook.com/4/picture?type=small

Facebook: get user thumb img URL upon connecting to the app

https://graph.facebook.com/4/picture?type=normal

Facebook: get user thumb img URL upon connecting to the app

https://graph.facebook.com/4/picture?type=large

Facebook: get user thumb img URL upon connecting to the app


Have you tried https://graph.facebook.com/[PROFILE_ID]/picture?

Check out doc here https://developers.facebook.com/docs/reference/api/

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜