Twitter的限速? [英] Twitter rate limit?

查看:1606
本文介绍了Twitter的限速?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

因此,我知道Twitter的速率限制为每小时150个请求. 但是由于某种原因,我不断从Twitter收到错误消息,表明我已达到速率限制,考虑到访问它的次数,这是不可能的.

So I'm aware that twitter has a rate limit of 150 requests per hour. But for some reason I keep getting the error from twitter that I have reached my rate limit, which is impossible considering the amount of times I accessed it.

我开始监视每小时剩余点击数的变化,并意识到它在半个小时左右的时间内就降低到了0.当时我认为问题出在我的网站没有专用IP,所以我要求与托管公司进行此更改.

I started monitoring the changes in hits left per hour, and realized that it decreases to 0 within half an hour or so. At that point I thought the problem is with my website not having a dedicated ip, so I requested this change to be made with my hosting company.

但是,即使在我的网站已移至专用ip之后,如果不使用它,每小时的点击量仍会以相同的速度下降..老实说,我不知道为什么会这样.

However even after my website has moved to a dedicated ip the remaining hits per hour still decreases at the same rate without me using it.. I honestly have no idea why this is happening.

还有一件有趣的事情: 我尝试使用以下提供的javascript代码: http://code.google.com/p/twitterjs/ 并发现即使在限制达到0后,它似乎仍然能够加载推文.

And an interesting thing: I tried using the javascript code supplied by: http://code.google.com/p/twitterjs/ and found that even after the limit reached 0, it still seems to be able to load tweets.

有人知道为什么会这样吗?

Anyone know why this is happening?

我正在处理的测试页: http://ice3studio.com/twitterTesting/ -白框的第一部分是带有php缓存的js(达到限制后无法抓取Twitter提要) -第二部分是Google代码中的js代码

Test page I was working on: http://ice3studio.com/twitterTesting/ - 1st section in the white box is js with php caching (which cannot grab twitter feed after limit is reached) - 2nd section is the js code from google code

我对此很陌生,因此,感谢您的帮助! 在此先感谢:D

I am very new at this so I appreciate any help! Thanks in advance :D

推荐答案

如果GET请求已通过身份验证,则速率限制将应用于用户,否则将应用于用户的IP. 仅GET请求具有速率限制. POST请求没有速率限制.

If the GET request is authenticated then rate limit applies to the user otherwise its the IP. Only GET request has rate limit. POST request has no rate limit.

Twitter JS可以加载推文,因为它运行在客户端上,并且每个客户端都有不同的IP.如果您将此库与相同帐户一起使用,则在发送经过身份验证的请求时,它将受到速率的限制.

Twitter JS can load tweets because its running on clients end and every client has different IP. If you use this library with a same account it'll be rate limited as you are sending authenticated request.

您始终可以将您的IP和帐户白名单.它将大大提高您的速率限制.

You can always white list your IP and account. It'll increase your rate limit greatly.

这篇关于Twitter的限速?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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