Found this useful? Love this post

Get statuses from a Facebook page without OAuth via RSS or JSON

Recently I came across the requirement to pull in the latest status updates from a number of our companies Facebook pages. This used to be a relatively simple process. However these days it requires an access token to grab this information from the Graph API. Since the CMS I’m using isn’t great with OAuth, I decided to look for an alternative.

Behold, the beloved RSS feed.

While the data it returns isn’t as great as the Graph API, it returns the status update (which was all that I was after) via JSON, RSS or Atom.

http://www.facebook.com/feeds/page.php?format=rss20&id=<FACEBOOKID>

If you’re not sure of what your Facebook ID is I’ve built a little tool to find it out below, just type in your page name to get the ID.

Facebook ID search

Find

In this example, take the portion after the .com/ from your desired page and enter it into the box above.

Screenshot example of the URL bar highlighting how to get a get a Facebook user ID to convert to the Graph API

For this method to work, you need to ensure that the page you are looking to read is public, that is, the posts can be seen without being logged into Facebook.

There are two parameters, with there respective options listed below. As far as I can tell, this seems to be it. But if you know of other parameters or options please leave a comment to let me know and I’ll add it to the list.

  • format
    • rss20
    • atom10
    • json
  • id
    • numerical id of the Facebook page

Subscribe

You'll only get 1 email per month containing new posts (I hate spam as much as you!). You can opt out at anytime.

Categories

Leave a Reply

Your email address will not be published. Required fields are marked *

Preview Comment

2 Comments

  1. roger
    https://www.domsammut.com/?p=570#comment-1827

    roger

    Hey that’s great tool, I used it a few times and it was working perfectly fine.
    I tried usind it today, and I don’t know why it seems not to work anymore (I do not know if it is a temporary bug…)
    It says “undefined undefined
    Top-level data set returned from Facebook Graph API”
    I have tried and checked with diferent ids and I get the same results.
    Any idea on how to fix this great tool ?

    • Dom Sammut
      https://www.domsammut.com/?p=570#comment-1829

      Dom Sammut

      Hi Roger,

      Thanks for highlighting this issue. Facebook have changed what data is publicly exposed via the API without a access token. As a result the JavaScript I was using needed to be modified slightly to pass the fields that I wished to view.

      The tool will now work again, albeit now just displaying the ID, the initial purpose of the tool. It will not be able to display any other information at this time.

      You can read more about the Facebook Version 1 depreciation.

      Cheers
      Dom

css.php