Jeshua Lacock
Jeshua Lacock

Reputation: 6668

Inconsistent Graph API Behavior for Album Requests

I am trying to get a listing of photo albums using:

https://graph.facebook.com/USER_ID/albums

It is working perfectly for some users, and other users I am getting nothing:

{
   "data": [

   ]
}

I am sure in both cases the user ID is correct and valid. For the users that return nothing I can see the albums when logged in as the same user, so I don't see how permissions could be an issue.

Any suggestions would be greatly appreciated!

Upvotes: 2

Views: 370

Answers (2)

Stéphane Bruckert
Stéphane Bruckert

Reputation: 22903

You'll get better results by writing it this way:

https://graph.facebook.com/USER_ID?fields=albums.fields(id)

I got this result while playing with the Graph API Explorer. Here,

enter image description here

you've to generate a new token with user_photos and friends_photos selected. Then, select what you need in the list:

enter image description here

And it seems to display what you need (at least if the ID you are looking for is the one of your friends)!

Upvotes: 1

Jeshua Lacock
Jeshua Lacock

Reputation: 6668

Igy appears to be correct. This is a duplicate of 10939051.

Since I could not find it, the setting that will exclude all user photos and albums from apps can be found by going to Privacy Settings > Apps, Games and Websites > How people bring your info to the apps they use > De-check My photos.

Here is a screen shot:

enter image description here

Upvotes: 1

Related Questions