Facebook 的 Graph API 调用限制是多少?

发布于 2024-12-24 17:52:14 字数 68 浏览 1 评论 0原文

我们对 facebook 的 graph api 的调用次数有限制吗? 如果存在,那么每个应用程序每天可以拨打多少个电话?

Is there any restriction in number of calls we make to facebook's graph api?
and If it is there then how many calls can we make per app daily?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

面如桃花 2024-12-31 17:52:14

另一个论坛对此问题的最佳答案,来自 Ash Rust,2010 年:

“经过与 Facebook 平台团队的一些测试和讨论,我不知道或在文档中找不到官方限制。但是,我发现每个令牌每 600 秒600 次调用; 每个 IP 是关于它们阻止您的地方。我还看到了一些基于应用程序的速率限制,但没有任何数字。

作为一般规则,每秒一次调用不应受到速率限制。从表面上看,这似乎非常具有限制性,但请记住,您可以批量处理某些调用并使用订阅 API 来获取更改。”


截至 2015 年 10 月,上述信息已过时。根据 https://developers.facebook.com/docs/graph-api/advanced/rate-limiting

The best answer to this question from another forum, from Ash Rust in 2010:

"After some testing and discussion with the Facebook platform team, there is no official limit I'm aware of or can find in the documentation. However, I've found 600 calls per 600 seconds, per token & per IP to be about where they stop you. I've also seen some application based rate limiting but don't have any numbers.

As a general rule, one call per second should not get rate limited. On the surface this seems very restrictive but remember you can batch certain calls and use the subscription API to get changes."


The above information is now obsolete as of October 2015. It's now 200 API calls per user in any given 60 minute window according to https://developers.facebook.com/docs/graph-api/advanced/rate-limiting

仄言 2024-12-31 17:52:14

现在官方

每个应用程序分配200次API调用用户在任何给定的 60 分钟窗口内

根据截至2015 年 10 月 7 日的 Facebook 文档,Graph API 的速率限制的工作原理如下:

  • 速率限制是在您的 Facebook AppId 上完成的。如果您的应用程序达到
    速率限制,对该应用程序进行的所有调用都将受到限制,而不仅仅是在
    每个用户的基础。
  • 速率限制是通过应用程序的用户数量来计算的
    前一天有并添加今天的新登录。这给出了一个基础
    您的应用程序拥有的用户数量。

举例来说,如果您的应用昨天有 10 个用户,今天有 5 个新登录,那么您的用户基数将为 15 个。这意味着您的应用程序可以在任何 60 分钟的窗口内进行 ((10 + 5) * 200) = 3000 个 API 调用。

更多信息请参见:https://developers.facebook.com/docs/graph-api/advanced/速率限制

--自 2016 年 4 月 12 日起更新--

Facebook 现在有一个速率限制仪表板,更容易看到如果您的应用程序的速率超出限制。它看起来像这样:

输入图像描述这里

Now it's official:

Each app is given an allotment of 200 API calls per user in any given 60 minute window.

From the Facebook documentation as of October 7th 2015, here's how rate limiting on the Graph API works:

  • Rate limiting is done on your Facebook AppId. If your app reaches a
    rate limit, all calls made for that app will be limited not just on a
    per-user basis.
  • Rate limiting is calculated by taking the number of users your app
    had the previous day and adding today's new logins. This gives a base
    number of users that your app has.

As an example, if your app had 10 users yesterday and 5 new logins today, that would give you a base of 15 users. This means that your app can make ((10 + 5) * 200) = 3000 API calls in any 60 minute window.

More information here: https://developers.facebook.com/docs/graph-api/advanced/rate-limiting

--Update as of April 12th 2016--

Facebook has now a Rate Limit Dashboard, which is much easier to see if your app's rate limit is exceeding. It looks like this:

enter image description here

老旧海报 2024-12-31 17:52:14

根据 Facebook 开发政策“I. 特性和功能”,唯一的限制是:

(>5M MAU)或(>每天 100M API 调用)或(>50M 每天展示次数)。

(Mau的意思是月用户)

它没有说超过限制后他们会做什么...

今天我已经跑到这个限制了:

对mailbox_fql 的调用已超过每600 秒300 次调用的速率。

总体而言,每个表都有不同的限制集,在大多数情况下,每个 fql 不会返回超过 30 个对象。另外,在我看来,您可以超出一张表的限制,同时您可以访问不同的表,问题是 api 是否对所有用户或仅对具有以下权限的用户被阻止(超出限制后)超出限制了……反正超出限制后你要等10分钟左右,还好。

因此从技术上讲,您每 10 分钟最多可以在表 mail_fql 中获取 300*30 个对象。

According to Facebook dev policies "I. Features and Functionality" the only limits are:

(>5M MAU) or (>100M API calls per day) or (>50M impressions per day).

(Mau means monthly users)

It does not say what will they do after exceeding the limits...

Today I have ran to this limitation:

Calls to mailbox_fql have exceeded the rate of 300 calls per 600 seconds.

Overall every table has different set of limits, in most of the cases fql wont return more than 30 objects per fql. Also it seems to me that you can exceed the limits to one table and at the same time you can access different table, the question is whether the api is blocked (after exceeding the limit) for all the user or only for the user that has exceeded the limits... Anyway, after you exceed the limit you have to wait for about 10 minutes, than it is okay.

So technically speaking you can get at most 300*30 objects per 10 minutes in table mailbox_fql.

一抹苦笑 2024-12-31 17:52:14

来自 facebook 文档

用户级别速率限制

此速率限制适用于除广告 api 之外的所有 api 调用的用户级别。

速率限制在滑动窗口上实时发生。
每个呼叫都会分配一个分数。最大分数为 n。
用户根据拨打的电话随着时间的推移累积分数。
当达到最大分数时,抛出节流错误。
错误,代码:17,消息:已达到用户请求限制

应用程序级别速率限制

此速率限制在应用程序级别全局应用。广告 API 调用被排除在外。

速率限制在过去一小时的滑动窗口上实时发生。
收集每个应用程序的调用和查询次数、花费的 CPU 时间、使用的内存等统计信息。
每个资源乘以给定应用程序的每月活跃用户数都有一个限制。
当应用程序使用超过其允许的资源时,会引发错误。
错误,代码:4,消息:已达到应用程序请求限制,请

检查此文档
https://developers.facebook.com/docs/reference/ ads-api/api-rate-limiting/

From facebook documentation

User Level Rate Limiting

This rate limiting is applied at the user level for all api calls except for ads apis.

Rate limitations happens real time on sliding window.
Each call is assigned a score. There is a max score of n.
User accumulates a score over time based on the calls made.
When the max score is reached, the throttling error is thrown.
Error, Code: 17, Message: User request limit reached

App Level Rate Limiting

This rate limiting is applied globally at the app level. Ads api calls are excluded.

Rate limiting happens real time on sliding window for past one hour.
Stats is collected for number of calls and queries made, cpu time spent, memory used for each app.
There is a limit for each resource multiplied by monthly active users of a given app.
When the app uses more than its allowed resources the error is thrown.
Error, Code: 4, Message: Application request limit reached

check this documentation
https://developers.facebook.com/docs/reference/ads-api/api-rate-limiting/

被翻牌 2024-12-31 17:52:14

根据 FB 文档,批次中的每个元素都算作单独的调用。

目前,我们将批次中的请求数量限制为 50 个,但为了计算 API 调用限制和资源限制,批次中的每个调用都会单独计数。例如,一批 10 个 API 调用将计为 10 个调用,并且该批次中的每个调用都会以相同的方式影响 CPU 资源限制。

请检查:https://developers.facebook.com/docs/graph -api/发出多个请求
https://developers.facebook.com/docs/marketing-api/api -速率限制

According to FB docs, each element in a batch counts as a separate call.

We currently limit the number of requests which can be in a batch to 50, but each call within the batch is counted separately for the purposes of calculating API call limits and resource limits. For example, a batch of 10 API calls will count as 10 calls and each call within the batch contributes to CPU resource limits in the same manner.

Please check this: https://developers.facebook.com/docs/graph-api/making-multiple-requests
https://developers.facebook.com/docs/marketing-api/api-rate-limiting

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文