简体   繁体   English

Facebook Graph API请求的速率限制是多少?

[英]What is the rate limit for Facebook Graph API requests?

I have a Facebook app setup in development mode and I am testing against Graph API v2.5. 我在开发模式下有一个Facebook应用设置,并且正在针对Graph API v2.5进行测试。 I have a service that will use my app to get the most recent posts, photos, likes and comments from our customers' Facebook business pages at least once an hour. 我有一项服务,将使用我的应用程序每小时至少一次从客户的Facebook业务页面获取最新的帖子,照片,喜欢和评论。 We will probably start off with a few hundred pages, but that may increase to well over 1000 in the near future. 我们可能会从几百页开始,但是在不久的将来可能会增加到超过1000页。

Testing on my machine, I was able to perform 300 requests for the latest post of a page in the span of 5-10 minutes and encountered no errors. 在我的机器上进行测试,我能够在5到10分钟的时间内执行300个页面最新帖子的请求,并且没有遇到任何错误。 Given the scenario I described above, what kind of limits would I run into if I grabbed the data from 1000 pages in the span of an hour? 在上述情况下,如果我在一小时的时间内从1000个页面中获取数据,将会遇到什么样的限制?

Thanks! 谢谢!

You will have no problem at all if you use Page Tokens for those Pages. 如果您为这些页面使用页面令牌,则完全没有问题。 If you try to get data of 1000 Pages, you will definitely have to implement a timeout between the calls. 如果您尝试获取1000页的数据,则肯定必须在两次调用之间实现超时。 Just because it worked with 300 in a row one time does not mean it works forever, you will definitely get to a limit very soon. 仅仅因为它可以连续使用300次并不意味着它可以永远持续工作,所以您肯定会很快达到极限的。 So either use a Page Token (highly recommended) or only do a small amount of calls and implement a timeout. 因此,要么使用Page Token(强烈建议),要么只进行少量调用并实现超时。

Btw, the official docs: https://developers.facebook.com/docs/graph-api/advanced/rate-limiting 顺便说一句,官方文档: https : //developers.facebook.com/docs/graph-api/advanced/rate-limiting

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM