Twitter4j: getting inconsistent authentication errors when calling getFollowersID

I am using Twitter4j version 3.0.3.

I am trying to pull out a retry id and use OAuth. I have been using Twitter4j for many years and am relatively experienced with wireframes.

However, something strange happens: my program will work fine, and then periodically throws the following stack trace:

Exception in thread "main" 401:Authentication credentials (https://dev.twitter.com/pages/auth) were missing or incorrect. Ensure that you have set valid consumer key/secret, access token/secret, and the system clock is in sync.
{"request":"\/1.1\/followers\/ids.json?user_id=20801287&cursor=-1&include_entities=1&include_rts=1","error":"Not authorized"}

Relevant discussions can be found on the Internet at:
    http://www.google.co.jp/search?q=92c30ec6 or
    http://www.google.co.jp/search?q=19400604
TwitterException{exceptionCode=[92c30ec6-19400604], statusCode=401, message=null, code=-1, retryAfter=-1, rateLimitStatus=RateLimitStatusJSONImpl{remaining=6, limit=15, resetTimeInSeconds=1362898120, secondsUntilReset=890}, version=3.0.3}
    at twitter4j.internal.http.HttpClientImpl.request(HttpClientImpl.java:177)
    at twitter4j.internal.http.HttpClientWrapper.request(HttpClientWrapper.java:61)
    at twitter4j.internal.http.HttpClientWrapper.get(HttpClientWrapper.java:89)
    at twitter4j.TwitterImpl.get(TwitterImpl.java:1817)
    at twitter4j.TwitterImpl.getFollowersIDs(TwitterImpl.java:400)

It produces the above value in the following line:

IDs ids= twitter.getFollowersIDs(id,cursor);

The above line runs just fine and then without warning.

Note. I check the speed limits, and the last time I came across this, the JSON speed limit pulled by the following line was (below):

RateLimitStatus rls=twitter.getRateLimitStatus().get("/followers/ids")

RateLimitStatusJSONImpl{remaining=7, limit=15, resetTimeInSeconds=1362898120, secondsUntilReset=890}

I thought it might be an intermittent thing with Twitter, but it has been going on for several days.

, ​​ .

, 20 .

SE:

+5
1

, -, twitter, .

+3

All Articles