开发者

Graph API - photo id does not return picture

I've an app which has requested for the "user_photos" permission. I've been trying to get the picture data with a photo id. eg. https://graph.facebook.com/123456/picture but I keep getting the error below:

"type": "OAuthException", "message": "A user access token is required to request this resource."

What I'm actually trying to achieve in the end is to retrieve the cover_photo of every album a user has. I'm using the AS3 Facebook API's Facebook.getImageUrl(id) function - which is working wel开发者_StackOverflowl with profile pictures - but not this.

Has anyone got the same problem?


The error describes the problem and suggest the solution, you need the access_token of the current (logged-in) user or an indefinite access_token (using offline_access permission) before you are able to get what you want.

Some objects on Facebook don't require access_tokens:

https://graph.facebook.com/cocacola/picture
https://graph.facebook.com/ifaour/picture

But some do:

https://graph.facebook.com/cocacola/feed
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜