-1

当我尝试使用 twitter4j 通过搜索 (sports +exclude:retweets) 之类的关键字来获取公共推文时,我收到以下错误:

420:Returned by the Search and Trends API when you are being rate limited (https:
    //dev.twitter.com/docs/rate-limiting).
    Returned by the Streaming API:
     Too many login attempts in a short period of time.
     Running too many copies of the same application authenticating with the same acc
    ount name.
    {"error":"You have been rate limited. Enhance your calm."}
    Relevant discussions can be found on the Internet at:
            http://www.google.co.jp/search?q=d35baff5 or
            http://www.google.co.jp/search?q=0877c84f
    TwitterException{exceptionCode=[d35baff5-0877c84f], statusCode=420, retryAfter=51
    1, rateLimitStatus=null, featureSpecificRateLimitStatus=null, version=2.2.6}
            at twitter4j.internal.http.HttpClientImpl.request(HttpClientImpl.java:185

    - Unable to search keyword = Query{query='sports OR +exclude:retweets', lang='n
    ull', locale='null', maxId=-1, rpp=-1, page=15, since='null', sinceId=-1, geocode
    ='null', until='null', resultType='null'} You have been rate limited. Enhance your calm

谁能告诉我为什么即使我只进行搜索操作也会得到这个?API有问题吗?

4

1 回答 1

0

正如错误所说,您似乎受到了速率限制。你连续运行太多次了吗?您的连接频率是否超出了需要?

于 2012-09-21T07:38:36.473 回答