Reputation: 386
I have a photo id "2296309061879" and it work perfectly in http://www.facebook.com/photo.php?fbid=2296309061879
I use the Graph API link: https://graph.facebook.com/2296309061879 get false as ALWAYS...... How about it work with my Access Token generated in my application that create by myself immediately?
still get false as ALWAYS......
So, how to get the photo from facebook with the photo id?
Another serious problem is, I use facebook's api to upload a photo to my account, and it return me the photo id. then I goto my facebook to check the photo: it does not exist in any album!!
What's wrong with facebook?
Upvotes: 0
Views: 1446
Reputation: 76918
Because your app doesn't have rights to access it.
This is a public photo from my facebook:
https://www.facebook.com/photo.php?fbid=2651141672758
It also returns false
if I try to use https://graph.facebook.com/2651141672758
If I try it in the explorer I also get false
:
https://developers.facebook.com/tools/explorer/?method=GET&path=2651141672758
If I click on the "get access token" button, and select the user_photos
permission ... it then works.
Edit: Note the first set of bullet points in the Graph API docs for photos: https://developers.facebook.com/docs/reference/api/photo/ - It would appear they're wrong, or there's a bug currently as it states any valid access token should be able to see public images and that's demonstrably not working. In order for the explorer app to list my albums and/or photos I have to explicitly grant it the user_photos
permission
Upvotes: 2