Friday, January 30, 2015

How to restore a Facebook Feed for your Webpage

As a new business entrepreneur, I setup a page for my website on Facebook. As a part of keeping my customers up to date I had to fetch my FB page feed onto my website, just posts, no comments, photos etc.

A brief Google of 'How to' led me to the RSS feed URL which was 

https://www.facebook.com/feeds/page.php?id[YOURID]=&format=json

But as you all know and why you are probably here, On Jan 28, 2015 the link above stopped working for all the pages. User took to the forum and Google revealed that FB encountered a bug. 

Apparently FB is restoring the RSS feed as per this page

https://developers.facebook.com/bugs/1539780319626180/

But they said that this RSS Feed will be expiring soon. 

In the mean time I wanted to find out a better way to get the feed on my page and could not afford a bald spot on my page

So here is my solution summary

  1. Create an APP on developers.facebook.com
  2. Get an APP ID and APP SECRET
  3. Create an APP token
  4. Use the APP token to fetch the feed
Details below

Create and APP 
I followed this link as a guide to certain point to get my APP ID


Create an APP Token
Assuming you have your APP created, Goto Facebook Graph API Explorer and click the dropdown shown below


Select your App. This will enable a button highlighted below



Clicking Get App Token button will display a token in Access Token box

Copy it and use it in following URL

https://graph.facebook.com/[YOUR-PAGE-ID]/feed?access_token=[YOUR-APP-TOKEN]&fields=id,message,type

For more details on fields and how to use the returned JSON in PHP, visit this link

You might also want to read How to Handle Expired Tokens

Hope this saves your valuable time!


Current Photo Contests » Current