开发者

twitter4j xAuth authentication

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜