I am working with FBGraphAPI in my project. I managed to g开发者_开发技巧et the list of albums. I tried to get picutre (cover_photo) and photos in albums. But somehow i stuck in it.
Which inbuilt method i need to use to get cover_photo and photos in the album? And how to use it?
To get the cover_photo, you need to use
https://graph.facebook.com/<id>/picture?type=album&access_token=<token>
where id is the cover_photo from your album returned in the album list. and token is your current session token
Note. It needs to be https and you need to specify the token. This is what makes it different than, for example, rendering a user's photo.
By photos in album, not sure if you mean the list of photos or the actual photo itself? The basic process is to use the id of the album returned and then call
https://graph.facebook.com/<id>/photos
This will return a list of photos in the album. Within this list will be 'source' which contains the url of the photo. Also a dictionary of different photo resolutions.
精彩评论