kalimocho
kalimocho

Reputation: 63

Facebook API - How to access my photo album?

I want to display photos from my Facebook albums on a website. What would be good way to achieve it?

Do I need oAuth authentication or can I just somewhere grant my website or application access to my albums? I don't want to have a Facebook login or auth dialog on my website.

Upvotes: 6

Views: 7592

Answers (1)

rzetterberg
rzetterberg

Reputation: 10268

What you need to do:

  1. Change your privacy settings to that everyone can see your photos. And add permissions for you Facebook application for your user account.
  2. Authenticate and retrieve access token through OAuth, BUT instead of doing it for the user you do it as the application. Read more about it here: http://developers.facebook.com/docs/authentication/#applogin
  3. You then call the api method to retrieve albums which is "{ user id }/albums" which will give you a list of your albums.
  4. Select the album you want to use and then call the api method to retrieve photos in the album which is "{ album id }/photos"

And then you are done, you have a list of all the photos in that album. You even get all the sources for the different dimensions.

Upvotes: 7

Related Questions