Facebook GraphAPI Reduce amount of data with limit

前端 未结 3 1203
梦谈多话
梦谈多话 2021-02-06 00:38

So I\'m struggling to find where this is documented (if at all), but I\'m getting the following error message when requesting data from the FB GraphAPI.

\"Please         


        
相关标签:
3条回答
  • 2021-02-06 01:10

    Recent bug filed on FB talks about the same error. They seem to accept that this could be a bug, but not much other information forthcoming.

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

    0 讨论(0)
  • 2021-02-06 01:19

    The response from CBroe is correct. Facebook returns this error if it finds that too many internal resources are needed to respond to your request.

    Therefore you have to do what the response says: limit it.

    This can be done in (afaik) 2 ways:

    1. Use the limit parameter and reduce the amount of responses you expect from the API
    2. Provide a timeframe (using since and / or until) to fetch only data (posts / videos) for a specific timeframe.

    We had the same issue as you, but with retrieving videos from a page. Unfortunately using the limit parameter did not work, even when I set it to limit=1. But by using the since / until parameters we finally got results.

    Therefore I suggest to implement a timeframe in order to reduce the amount of data, or alternatively, split the amount of requests you make. e.g. if you want all posts from the past 3 months and run into the mentioned error: split your requests in half using since and until. If that still does not work: keep splitting...

    => Divide and conquer ;)

    Hope it helps, KR, ebbmo

    0 讨论(0)
  • 2021-02-06 01:30

    There are both app-level and user-level rate limits that are enforced on Graph API calls. In your case, it could be that you've made a large number of calls in a short time with user1.

    You can check out this page for more about Facebook's rate limits: https://developers.facebook.com/docs/marketing-api/api-rate-limiting (even though the URL refers to the Marketing API, the information also applies to the Graph API.)

    0 讨论(0)
提交回复
热议问题