0
votes

The documentation says that GET /{page-id}/photos returns an "An array of Photo objects.", see https://developers.facebook.com/docs/graph-api/reference/page/photos.

And the documentation for the photo object and GET /{photo-id} says it includes the album field, see https://developers.facebook.com/docs/graph-api/reference/photo.

Though, I can't see that field in either /{page-id}/photos or /{photo-id}.


Example:

Take the first photo of http://graph.facebook.com/FacebookDevelopers/photos, which is this. As you can see on the facebook page, this photo belongs to the "Profile Pictures" album, but the response of http://graph.facebook.com/FacebookDevelopers/photos does not mention any album information.

Same for http://graph.facebook.com/10151403325753553, I don't see any album field or information.

Anybody an idea what is going on? This seems to be a bug either in the api or in the documentation?

1

1 Answers

1
votes

Not a bug actually. Its just that not all the fields are returned by the API since there could be too many fields related to an API. Logical yeah..

But you can always request for the fields you want with ?fields=

For the same examples you've used:

Example 1:
http://graph.facebook.com/FacebookDevelopers/photos?fields=images,link,picture,source,album

Example 2:
http://graph.facebook.com/10151403325753553?fields=images,link,picture,source,album

In the result you'll see the desired key album.