Hi all,

I'm glad to announce that now Twitter4J supports xAuth.
http://twitter4j.org/jira/browse/TFJ-303

This release also includes a significant performance improvement.
http://twitter4j.org/jira/browse/TFJ-319

You can download the latest stable build at:
http://twitter4j.org/en/index.html#download
http://twitter4j.org/maven2/org/twitter4j/twitter4j-core/2.1.1-SNAPSHOT/

Usage:
1. specify consumer key/secret combination with either twitter4j.properties or 
system properties
Using twitter4j.properties:
---------
oauth.consumerKey=[your app's consumer key]
oauth.consumerSecret=[you app's consumer secret]
---------
# twitter4j.properties should be located under either the default directory, 
the root of your classpath, or the WEB-INF/ directory

Using system properties:
-Dtwitter4j.oauth.consumerKey=[your app's consumer key]
-Dtwitter4j.oauth.consumerSecret=[you app's consumer secret]

2. your code will go like this
//get a Basic authenticated instance
Twitter twitter = new TwitterFactory().getInstance(screenName, password);
//and then you can get an AccessToken without user interaction
AccessToken token = twitter.getOAuthAccessToken();
// production apps may want to persist the access token here
twitter.updateStatus(new Date() + ": xAuth test.");

Thanks,
-- 
Yusuke Yamamoto
yus...@mac.com

this email is: [x] bloggable/tweetable [ ] private
follow me on : http://twitter.com/yusukeyamamoto
subscribe me at : http://samuraism.jp/blog/

Reply via email to