Facebook的图形API速率限制和批处理请求 [英] Facebook graph API rate limit and batch requests

查看:275
本文介绍了Facebook的图形API速率限制和批处理请求的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我见过一些提到(600来电/ 600频率(秒)极限如上的 Quora的)。

I've seen the 600 calls / 600 seconds rate limit mentioned by some (e.g. on quora).

我想知道的是我是否可以做600 一批在600秒的请求(批处理请求由多达50个请求)。

What I want to know is whether I am allowed to do 600 batch requests in 600 secs (a batch request consists of up to 50 requests).

推荐答案

您应该处理的速度通过​​检查以下错误消息编程限制。那么你应该把在时间等待循环下一个电话之前,如果遇到错误。我的一个高流量的应用占手表这个错误,并会减慢。

You should handle the rate limiting programmatically by checking for the following error message. You should then put in a time-wait loop before your next call if you encounter the error. One of my high traffic applications accounts watches for this error and will slow down.

从:<一href=\"https://developers.facebook.com/docs/bestpractices/\">https://developers.facebook.com/docs/bestpractices/

率限制(API_EC_TOO_MANY_CALLS)如果您的应用程序发出了太多的电话,API服务器会自动打分限制你,
  返回一个API_EC_TOO_MANY_CALLS错误。一般情况下,这是不应该
  发生。如果是这样,那是因为你的应用程序已经确定
  被拍过多API调用。迭代您code所以你做
  如为了维护用户体验几个电话尽可能
  必要的。你也应该避免复杂的FQL查询。要了解
  如果你的应用程序被节流,去洞察并点击
  节流。

Rate limited (API_EC_TOO_MANY_CALLS) If your application is making too many calls, the API server might rate limit you automatically, returning an "API_EC_TOO_MANY_CALLS" error. Generally, this should not happen. If it does, it is because your application has been determined to be making too many API calls. Iterate on your code so you're making as few calls as possible in order to maintain the user experience needed. You should also avoid complicated FQL queries. To understand if your application is being throttled, go to Insights and click "Throttling".

修改

由于在评论跟帖报道IGY,在那批计为1。你的600的例子是最大限制每个请求,这意味着你可以断火含50元话费15批次的每个请求

As reported by Igy in the comment thread, each request in that batch counts as 1. For your example of 600 being the max limit, that means you can fire off 15 batch requests containing 50 calls each.

这篇关于Facebook的图形API速率限制和批处理请求的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆