Using the Facebook Javascript API, I am requesting all photos from a certain Facebook album:
FB.api('/'+albumid+'/photos?fields=id,picture,name,comments&limit=1000', function(photos)
{
//do something
})
Here, the limit parameter refers to the number of photos to return. Is there also a way to set the number of comments per photo to return? Or do I need to query /comments for each photo itself?
There is no way to specify limit of results for nested data from one of connections (like
commentsin that case).For comments only small amount of last comments will be returned for each photo (if any). To get all comments for a photo you’ll need to retrieve ’em from
/PHOTO_ID/comments.