Devon Matt
Devon Matt

Reputation: 41

{ "error_code": 1, "error_msg": "An unknown error occurred" } Facebook Graph API

When I try to pull out posts for the pages I manage, Facebook Graph API Explorer returns the following error: { "error_code": 1, "error_msg": "An unknown error occurred" }

The requests worked fine until today. Do you have any idea what went wrong? I am guessing this is a Facebook bug. Has anyone else encountered this> The graph API request: https://graph.facebook.com/v2.2/PAGEID/promotable_posts?is_published=false&limit=10&access_token=xxxxx where xxxxxx is my access token with full permissions PAGEID is the page id for the page.

Upvotes: 2

Views: 3174

Answers (1)

offex
offex

Reputation: 1885

I was getting this error when requesting a limit of 200 on a /feed. I changed the code to detect an {"error_code":1} and reduce the limit by half until the call is successful.

Upvotes: 1

Related Questions