开发者

Get the uploaded photo from Graph API [closed]

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center. Closed 11 years ago.

I developing a process to upload a photo to a users account with the graph api. While I am successful with being able upload the photo. I unable to retrieve the same said photo that was uploaded just 2 seconds ago. Using a user's access_token I get "false". Using an Ap开发者_JAVA技巧plication's access token i get

"A user access token is required to request this resource"

How are you suppose to retrieve the url of the photo that you just uploaded with the graph api


When you upload the photo, it should return an ID. Use that ID to access it. Also, you may have to wait until that photo has finished processing. Try the call again in a few minutes after the photo has been uploaded.


$data = $facebook->api('/'. $ALBUM_ID . '/photos', 'post', $args);

$data['id'] is the id of the image you just uploaded.


turns out I had to update my SDKs


Seems as if sometimes you can't access the photo without getting an access token with the "user_photos" permission. Sometimes, as in, for some users you don't need it, and for some you do. Most excellent.

EDIT: actually, this only seemed to work in the graph API explorer and not the iOS app. At least they're consistent.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜