Twitter API 请求限制问题 [英] Twitter API Request Limit Problem
本文介绍了Twitter API 请求限制问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我编写了一个小型 Java 程序来从 Twitter 下载所有朋友和关注者的个人资料图片.但是我收到一个错误,因为每个 IP 地址每小时只允许 150 个请求.
I've written a small java program to download all friends' and followers' profile pictures from twitter. But i'm getting an error because only 150 requests per hour per IP address is allowed.
确切的错误是:
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>
有没有办法解决这个问题……???请帮忙...
Is there a way around this problem...??? Please help...
推荐答案
作为开发人员,您可以请求将您的帐户列入白名单,将限制提高到 20 000 个请求/小时.在 http://apiwiki.twitter.com/Rate-limiting
As a developer you can request whitelisting of your account, raising the limit to 20 000 requests / hours. Read more at http://apiwiki.twitter.com/Rate-limiting
这篇关于Twitter API 请求限制问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文