Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 789
kalimocho Avatar asked Apr 18 '11 20:04

kalimocho


People also ask

How do you access photo Albums on Facebook?

If you have a private album on Facebook, you can access it from your profile. Tap in the top right of Facebook, then tap your name. Scroll down and tap Photos. Tap the album you'd like to view.

How do I find my photo Albums on Facebook mobile app?

Tap the three horizontal lines at the top-right corner and tap on your profile. Scroll down on your profile and tap the Photos option. You will see all your Facebook photos. If you want to view photos from a certain album, tap Albums at the top and select your album to view its photos.


1 Answers

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.

like image 197
rzetterberg Avatar answered Sep 27 '22 22:09

rzetterberg