Facebook Graph API Note

The Tools:


Tuts:  Getting Started: The Graph API

Get Facebook album photos

First I need to get album Id form the url of the album. For exsample: https://www.facebook.com/media/set/?set=a.551368994899204.1073741832.157343067635134&type=3
Then 551368994899204 is the id of the album.

Now, use this request:
Click above link, you can get the json result from Facebook. It is all the info of this album.

But I need all the photos of this album. So I need add ‘photo’ connection. Basically the request is like this:  https://graph.facebook.com/551368994899204?fields=photos

Above will return too much info. And I only need get some specific fields so I add some fields on it: https://graph.facebook.com/551368994899204?fields=photos.fields(source)

Now it returns what I want:


Leave a Reply