We are showing feeds from Facebook on our website. Until yesterday, we were able to retrieve the feeds in JSON format using the URL below:
https://www.facebook.com/feeds/page.php?format=json&id=[id_of_the_page]
But today I found that the link was broken. Is there a reason for it breaking?
And is there a way that I can access the JSON feed for my page using the new Graph API?
Facebook feed is not loading due to a lot of reasons, for instance, slow internet speeds, connected to VPN, wrong date and time settings, using backdated Facebook version, or Facebook bugs, etc. There might be some browser cache and cookies or browser extensions that might create the issue.
If your Facebook feed doesn't appear to be showing the most recent posts, or if some posts which are shared to your Facebook page are missing, then the most likely explanation is that those posts in your feed may be shared from a user's personal Facebook profile or a Facebook page which has an age or location ...
Finally I was able to get the Facebook page feeds back on my website. Here goes the steps I followed to restore the feeds:
Step 1: I logged into Facebook developer portal and created new Facebook Application (Website). You can find the details on how create a Facebook App from the following link: How to Create Facebook App
On the newly created app you will find the "App ID" and "App Secret" values.
Step 2: On my website, I used the "App ID" and "App Secret" to retrieve an "access_token" from Facebook. I used C#, so the line of code I used was:
string access_token = ""; try { access_token = webClient.DownloadString("https://graph.facebook.com/oauth/access_token?client_id=616255239999&client_secret=989898989898acec7c3aabbccddf84b66&grant_type=client_credentials"); } catch {}
Replace client id with app id and client secret with app secret values copied from the previous step. If the values are correct you will get a response like:
access_token=616255878567492343|UYgAYWXYztpFGRawnZ2VlTE
Step 3: Now use the access token retrieved from the previous stage to call Facebook Graph API to get the feeds:
string facebookjson = webClient.DownloadString("https://graph.facebook.com/v2.2/1730999949494/feed?access_token=616255878567492343|UYgAYWXYztpFGRawnZ2VlTE");
The construct of the URL would like below:
https://graph.facebook.com/v2.2/[your_facebook_page_id]/feed?access_token=[your_access_token_value]
And voila!! You get the feeds from your Facebook page in a JSON response.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With