Are non-app users' pictures still avalible in Facebook Open Graph v2.0?

六眼飞鱼酱① 提交于 2019-12-05 19:21:32

It is still possible to get a person's profile picture in v2.0.

http://graph.facebook.com/v2.0/APP_SCOPED_ID/picture will redirect to a picture of the user represented by that app-scoped ID.

If a user previously logged into your app when your app was coded against v1.0, they may still be known to your app by their original Facebook user ID. For this reason, http://graph.facebook.com/v2.0/ORIGINAL_USER_ID/picture will also still work.

/<user id>/picture does not require an access token in V2.0 and will work even when <user id> is an app scoped ID

The ID provided needs to be the user's actual ID or an app scoped IDthe response from /<user id>/invitable_friends or /<user_id>/taggable_friends won't work in the same way

Both of those APIs will also return you the full URL of the invitable or taggable user's photo as part of the response, though.

It does work fine with original user IDs. For app-scoped IDs I haven't figured out how to use them.

While http://graph.facebook.com/v2.0/APP_SCOPED_ID/picture is supposed to work with the new app-scoped IDs, I can only get this response:

{ "error": { "message": "Unsupported get request.", "type": "GraphMethodException", "code": 100 } }

Note that this response is different from the response for completely invalid IDs. If you use an invalid user ID, you would get:

{ "error": { "message": "(#100) No node specified", "type": "OAuthException", "code": 100 } }

EDIT: As of May 10, 2014 this is a known bug.

The Graph API request that is currently working is http://graph.facebook.com/v2.0/APP_SCOPED_ID?fields=picture

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!