Israel Zalmanov
Israel Zalmanov

Reputation: 821

Facebook Graph API - empty JSON array for public albums of non-friends

Facebook's documentation states "To read an Album you need... Any valid access_token if it is public". See: http://developers.facebook.com/docs/reference/api/album/

I'm calling this URL: https://graph.facebook.com/${user_id}/albums?access_token=${token}

When I call the URL above with a user id of a friend, I get a list of albums, but when I call it with a non-friend user id I get an empty array, although I can confirm that the user's albums are public (I can view these albums in Facebook).

Is the documentation incorrect? Did I misunderstand something? Am I missing something?

Upvotes: 3

Views: 1657

Answers (1)

Igy
Igy

Reputation: 43816

It's not 100% clear from the context, but it sounds like you're trying to access the album of a user, who is not a friend of the current user. This is not supported via the API.

The three types of photo access which are supported (listed in the Album documentation) are:

  • The albums belonging to a Page,if they're public-visible, using any access token
  • The user's own albums, using the user_photos Permission
  • The user's friends' albums, using the friends_photos Permission

Upvotes: 4

Related Questions