Java – twitter4j access token is already available

I received an error message when using twitter4j:

java.lang.IllegalStateException: Access token already available.
twitter4j.auth.OAuthAuthorization.getOAuthRequestToken(OAuthAuthorization.java:112)
twitter4j.auth.OAuthAuthorization.getOAuthRequestToken(OAuthAuthorization.java:104)
twitter4j.TwitterBaseImpl.getOAuthRequestToken(TwitterBaseImpl.java:276)
twitter4j.TwitterBaseImpl.getOAuthRequestToken(TwitterBaseImpl.java:269)
[...]

Call method twitter This exception is thrown when getoauthrequesttoken() I want to get the authorization URL to authenticate the next user

How can I solve this problem? I only put oauthconsumerkey, oauthconsumersecret, oauthaccesstoken and oauthaccesstokensecret into the twitter4j attribute However, how do I receive authorization URLs to authenticate new users?

Thank you and greetings,

Martin

Solution

i 'm sorry.

I am setting up an access token hard coded by the configuration builder

Delete it and work now

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>