1

I'm looking for code or advice on how to get an RSS feed (or equivalent stream of data) of photos from one or more Facebook Pages and User Profile pages.

Background:

This is for a friend who wants to show their photos from their Facebook profile and page on their own website. This means that they would only have to load new photos up once, on Facebook and this feature would automate showing them elsewhere.

Some technical conditions:

  • Privacy settings: The photographs would obviously be public in Facebook to enable them to be available externally
  • I understand that some procedure for registering with Facebook Developer site to get an Application id might be involved
  • Each picture should have the following data in the feed:
    • The direct URL of the image
    • The title
    • The album it is from
    • The user or page that it is from
    • The data of upload
  • Also in the feed would be the album notes and location

I'm aware of Wordpress Fotobook plugin http://wordpress.org/extend/plugins/fotobook/ that claims similar functionality (haven't tried it yet). However I think it would be better to have a generic version that could be used with any website technology, for my case the preference would be Drupal. A generic functionality would be output the feed as an RSS.

I'm considering writing the code myself but thought I would find out what is already out there.

6
  • Why Facebook? Flickr offers RSS and less downscaling of the photos. Mar 8, 2012 at 14:06
  • Because that's what the customer (my friend) wants! It's a not a question of which photo hosting service to use. My friend is an active user on Facebook and wishes that his photos are not only available to his Facebook friends on there but also externally via another site. In other words, the requirement is that the photos are required on Facebook but also via other sites. Mar 8, 2012 at 14:48
  • To add: I love Flickr and use it myself. I think there is no photo sharing service/site better than Flickr and think in many ways it is much better for photography (tags, "publicness", user policies, easier browsing for non-users) than Facebook (which I am also a moderate user of), but that is not the requirement of my friend. Mar 8, 2012 at 14:53
  • 2
    The subtext of my point was that when a client says they want something which appears substandard I check that they are aware of the better options and have made a decision. A lot of the time, what the client says they want and what they really want are two different things, and requirements gathering is about finding out what they really want. If you've suggested to your friend that a better approach would be to upload to Flickr and have an automated process to post the photos from Flickr to Facebook, it would be worth editing the question to include that information. Mar 8, 2012 at 15:14
  • 1
    +1 @PeterTaylor I agree and recognise the process of requirements gathering. I am aware of linking Flickr to Facebook as you describe and my friend has a Flickr account which they occasionally use. But I am not sure if they are aware themselves that Flickr can be linked to Facebook. I realise that using Flickr with Facebook might be a better option though this might not convince them to shift their activity away from Facebook which is their primary 'social' platform. Mar 8, 2012 at 15:41

2 Answers 2

4

It is not possible to retrieve facebook photo data through RSS, you can however use the API which retrieves the data in json format. You just need to know the specific id of the album you want to get the data from.

For instance, if I'd wanted to get the photos from this album: https://www.facebook.com/media/set/?set=a.10150666707363306.415137.40796308305&type=3

The number between the dots is the ID of the album, so: 10150666707363306

Now you need the graph API to retrieve the data like this: http://graph.facebook.com/id_of_album/photos, so this becomes http://graph.facebook.com/10150666707363306/photos.

Now you've got the data and you just need to parse the json to readable information.

I don't know the technology you're using, so here are some options (on the bottom of the page): http://www.json.org/

To get the photos of a user, this is much more complicated, as you need an access_token to get the data. I'd just get it from the page if I were you.

5
  • Thanks @samn. +1 and accepted. Are your URLs you mention complete - I refer to: "graph.facebook.com/id_of_album/phots, so this becomes graph.facebook.com/10150666707363306/photos." - was there meant to be something on the end of these. I know they are examples with "insert id_of_album here" placeholders but wondered if there should be anything on the end. Mar 9, 2012 at 14:31
  • P.S. I would be using this with a Drupal 7 site. But I am keen on a generic solution, including one which I myself can help provide, so that other people using other systems can benefit. Mar 9, 2012 at 14:34
  • Facebook Pages do have RSS widgets (top right drop down from the cog symbol) but I'm not sure how that works depending how or if one is logged in Mar 9, 2012 at 14:35
  • 1
    I've edited a typo; phots->photos. graph.facebook.com/10150666707363306/photos seems to work well
    – samn
    Mar 9, 2012 at 15:04
  • How do you know it's not possible? I'm getting image URLs in my facebook page rss feed, but they are currently broken. It would seem strange if facebook actually included image urls in the rss feed, if they didn't want you to be able to fetch the images.
    – Magne
    Mar 19, 2015 at 14:40
2

Rather then exporting from Facebook, might it be easier for you -- and provide more long-term control to the client -- to post photos on their own site and then export these to Facebook using RSS Graffiti or some similar service, along with everywhere else?

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.