Question

I've been searching for a few months now and I'm just tired of searching...

I have a PERSONAL facebook account. It is not a business account or a fan account or anything like that. I want to automagically put the photos on my personal website. This is what I've found: Hundreds of examples about how easy it is, but they only work with fan accounts. A few claims that if I spend a few years making a Horoku app, I might be able to get it to work. Many blogs about people who tried this, gave up, installed Wordpress and converted everything to Wordpress, tried all the Facebook photo widgets only to find that none of them work, and finally giving up.

So... Is there an example ANYWHERE of someone who wrote some code to fetch the names of all albums shared with the public and all the pictures shared with the public for a personal Facebook account? Also - this is NOT a request for a widget or app. I asked this question twice before and both times it was closed right away because the first person buzzing by said I was asking for a Wordpress widget or app.

Was it helpful?

Solution

Easiest way:

  • Get an account on IFTTT and set up a recipe that takes photos uploaded to your personal Facebook account and posts them to a public location you can access or embed on your website.

Second easiest way:

  • Create a Facebook Page that only you can post to.
  • Share your photos with that page.
  • Either query https://graph.facebook.com/PAGE_ID/photos (no access token required) and parse the returned json to display the photos (or use any number of tutorials / prepared scripts to display the photos).

The way that meets your request exactly:

  • Create a Facebook app (not a Heroku App).
  • Configure the app for "Website with Facebook Login" with your website information.
  • Login to that app with only the user_photos permission and store the short-term access token you are given.
  • Extend the short-term access token and store this.
  • Use this access token to query https://graph.facebook.com/me/albums?access_token=ACCESS_TOKEN, and find the id of the album you want to share.
  • Code your script to query https://graph.facebook.com/ALBUM_ID/photos.fields(source)&access_token=ACCESS_TOKEN and parse the returned json object to use the urls returned in each source object as the src for <img> tags to display these photos.
  • Code a reminder system for you to renew your stored access token at least once every 60 days, or whenever it expires.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top