开发者

twitter4j xAuth authentication

开发者 https://www.devze.com 2023-03-14 00:59 出处:网络
I\'m trying to integrate xauth authentication using the twitter4j library I\'ve found multiple guides similar to http://www.hiteshagrawal.com/java/twitter-xauth-permission-using-java that all indicat

I'm trying to integrate xauth authentication using the twitter4j library

I've found multiple guides similar to http://www.hiteshagrawal.com/java/twitter-xauth-permission-using-java that all indicate i should have the line:

Twitter twitter = new TwitterFactory().getInstance(username, password);
开发者_JAVA百科

But this gives me an error, because the getInstance() method doesn't allow the parameter of two strings.

Did the twitter4j library change, or am I doing something wrong?


Twitter deprecated Basic authentication and as of Twitter4J 2.2.0, you need to use Twitter#getOAuthAccessToken(id,password) to get the access token. http://twitter4j.org/en/versions.html#migration21x-22x

0

精彩评论

暂无评论...
验证码 换一张
取 消