我写了一个小型java程序,可以从twitter下载所有朋友和关注者的个人资料图片。但是我收到一个错误,因为每个IP地址每小时只允许150个请求。Twitter API请求限制问题
确切的错误是:
twitter4j.TwitterException: 400:The request was invalid. An accompanying error message will explain why. This is the status code will be returned during rate limiting.
<?xml version="1.0" encoding="UTF-8"?>
<hash>
<request>/users/show/92715794.xml</request>
<error>Rate limit exceeded. Clients may not make more than 150 requests per hour.</error>
</hash>
有没有解决这个问题的方法... ???请帮忙...
哦,是的,你为什么不使用OAuth? BASIC Http身份验证自2010年7月1日起已被弃用。您每小时可以获得350个请求。唯一的问题是你需要在Twitter.com上创建一个应用程序。 – 2010-07-16 13:24:47
可能只是巧合,但错误消息中的Twitter用户似乎与其中一个“填写调查问卷”的垃圾邮件网站和谷歌搜索URL以及“垃圾邮件”导致许多相同的推特被盗用或虚假的Twitter帐户。这样的垃圾邮件是Twitter首先限制速度的原因之一 – barrowc 2010-07-17 06:30:50