Facebook GraphAPI Reduce amount of data with limit

前端 未结 3 1216
梦谈多话
梦谈多话 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: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

提交回复
热议问题