我寫了一個小型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