google-app-engine - 推特速率限制超过谷歌应用引擎

标签 google-app-engine twitter

我正在使用 google app engine 并想下载给定用户的推文。

我只是调用http://api.twitter.com/1/statuses/user_timeline/USERNAME.json

但几乎总是(大约 99% 的时间)我收到“超出速率限制。客户每小时不能发出超过 150 个请求”这个问题是否与 Google App Engine Cloud 基础设施有关?我该怎么办? (例如将数据存储在其他服务器上,然后从那里调用...)

最佳答案

does this problem has something to do with Google App Engine Cloud inrastructure

是的。

您调用的 API 方法是 rate-limited :

The default rate limit for calls to the REST API is 150 requests per hour. The REST API does account- and IP-based rate limiting. Authenticated API calls are charged to the authenticating user's limit while unauthenticated API calls are deducted from the calling IP address' allotment.

如果您的应用有专用 IP,这会很好用;在 App Engine 上,许多应用程序可能会为其 urlfetch 请求使用相同的源 IP,因此对 Twitter API 的未经身份验证的请求都将使用相同的配额。

我没有对此进行测试,但我的理解是,即使对于不需要身份验证的调用,如果您选择对您的请求进行身份验证,它将计入您的帐户配额而不是共享 IP 配额。

尼克·约翰逊发布了 a tutorial关于如何从 App Engine 向 Twitter 发送经过身份验证的 API 调用。

关于google-app-engine - 推特速率限制超过谷歌应用引擎,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3284205/

相关文章:

twitter - API搜索推文 "wildcard"

twitter - 如何在应用程序的二进制文件中存储 secret API key ?

java - 使用 Twitter4j 转发并发表评论

javascript - 尝试使用 MeteorJS 和 twit Node 模块,错误 : [TypeError: Object #<Object> has no method 'request' ]

javascript - 在手机上拍照并上传到谷歌云服务

google-app-engine - 在 Google App Engine 上通过 OKClient 使用 OkHttp 客户端会抛出 "java.lang.NoClassDefFoundError: java.net.ProxySelector"is a restricted class 错误

google-app-engine - 是否有任何官方计划在 Google App Engine 上支持 Dart?

java - appengine 数据核增强器问题,类未得到增强

java - GoogleApps - 如何导入我的应用程序

ios - 没有社交框架的 Twitter 登录