Reputation: 11854
Before I ask give some information which i am already able to achieve:
I'm able to get the group feed in JSON format
group_id
, acess_token
. https://graph.facebook.com/v2.1/{group_id}/feed?access_token={access_token}
I'm able to achieve the albums of the group
https://graph.facebook.com/v2.1/{group_id}/albums?access_token={access_token}
What I'm NOT able to achieve:
https://graph.facebook.com/v2.1/{album_id}/photos?access_token={access_token}
https://graph.facebook.com/v2.1/{album_id}?fields=photos&access_token={access_token}
URL USED:
https://graph.facebook.com/v2.1/{album_id}/photos?fields=picture,source,name&type=uploaded&access_token={access_token}
{
"data": [
]
}
I even tried the above in the 'Graph API Explorer', I get the same output.
Upvotes: 3
Views: 1614
Reputation: 993
Due to permissions restrictions it is not possible to retrieve all photos from group albums unless the user uploaded those albums themselves.
The Graph API reference mentions that one of the following is necessary to retrieve a regular album:
Oddly, the /{group_id}/albums
edge, is undocumented. Here's what I've learned from experience about accessing group albums:
You were using the correct queries. For completeness I will restate them here.
Album information
https://graph.facebook.com/v2.1/{group_id}/albums?access_token={access_token}
Photos
https://graph.facebook.com/v2.1/{album_id}?fields=photos&access_token={access_token}
You can still access photo attachments (but not albums) off of /{group_id}/feed
Upvotes: 3