pavelk2 / social-feed

JavaScript plugin that shows a user feed from the most popular social networks
http://pavelk2.github.io/social-feed-example/
MIT License
963 stars 304 forks source link

Facebook V2.4 API no longer working #326

Closed kierweb closed 6 years ago

kierweb commented 6 years ago

It appears FB v2.4 API is no longer working, so therefore change v2.4 to v2.12 in your coding to get it working again!

e.g. request_url = Feed.facebook.graph + 'v2.12/' + userdata.id + '/posts'+ fields + limit + query_extention;

Hypocrite commented 6 years ago

I am also experiencing problems with Facebook. Seems like the user ID is now undefined.

https://graph.facebook.com/v2.12/undefined/posts?fields=id,from,name,message,created_time,story,description,link,picture,object_id&limit=3&access_token=xxx&callback=jQuery17201847952254809746_1524899393361&_=1524899395446

Error given from FB:

/**/ jQuery17201847952254809746_1524899393361({
   "error": {
      "message": "Unsupported get request. Object with ID 'undefined' does not exist, cannot be loaded due to missing permissions, or does not support this operation. Please read the Graph API documentation at https://developers.facebook.com/docs/graph-api",
      "type": "GraphMethodException",
      "code": 100,
      "error_subcode": 33,
      "fbtrace_id": "ENNC/bdj1f7"
   }
});

Using following method to pull the feed:

facebook:{
                            accounts: ['@account'],  //Array: Specify a list of accounts from which to pull wall posts
                            limit: 3,                                   //Integer: max number of posts to load
                            access_token: 'xxx|xxx'  //String: "APP_ID|APP_SECRET"
                        },

Demo seems broken also for Facebook: https://pavelk2.github.io/social-feed-example/

kierweb commented 6 years ago

No problems on user id here, double check you still have userdata.id in the coding.

Hypocrite commented 6 years ago

Seems like the problem is with the Access token generated with app id and app secret. This has worked before.

I am now getting the following error:

/**/ jQuery172054060393499917_1525269570319({
   "error": {
      "message": "(#10) To use 'Page Public Content Access', your use of this endpoint must be reviewed and approved by Facebook. To submit this 'Page Public Content Access' feature for review please read our documentation on reviewable features: https://developers.facebook.com/docs/apps/review.",
      "type": "OAuthException",
      "code": 10,
      "fbtrace_id": "GQhqRewB4n7"
   }
});

I noticed that the demo is again working with Facebook also: https://pavelk2.github.io/social-feed-example/

I quickly tested my own page with the demos app id and app secret and it worked. So problem is with my own applications app id and app secret. Any idea what are needed steps to make the app work with my own app?

martijngastkemper commented 6 years ago

PR #330 and #336 solved this problem. I've merge the latests. Pull the gh-pages branch to get the latests updates.