<< March 2009 | Home | May 2009 >>

Twitter4J 2.0.0 released, now officially supports OAuth authorization scheme

Twitter4J is an open-sourced, mavenized and Google App Engine safe New! Java library for the Twitter API which is released under the BSD license.

Twitter4J 2.0.0 is now available for download.



This version is already available in the Maven central repository.
http://repo1.maven.org/maven2/net/homeip/yusuke/twitter4j/

Compatibility note:
- OAuth support
Now Twitter4J supports OAuth authorization scheme.
You can still use userid / password combination to authenticate the user, but migrating to OAuth scheme is encouraged by the Twitter team.
Currently the usage of OAuth support is poorly documented.
Please refer twitter4j.examples.OAuthUpdate for now.

- deprecation of "Date since" parameter
All methods take "Date since" are now deprecated.
It is suggested by the Twitter team to use "since_id" where you can specify the oldest id of the status in the response.

- deprecation of UserWithStatus class
Due to the change of the Twitter API, all User information includes the latest status of the user and UserWithStatus is replaced by ExtendedUser.
Now getUserDetail() / verifyCredentials() / getUserDetail() return ExtendedUser.
ExtendedUser is extending UserWithStatus for now and applications are still compatible at the source code level.

- verifyCredentials now returns ExtendedUser, not boolean
Now verifyCredentials() returns Extended User information as documented in the Twitter REST API doc.
Accordingly, getAuthenticatedUser() is now deprecated.

Here are the list of fixes included in version 2.0.0.
Release Notes - Twitter4J - Version 2.0.0

Bug

  • [TFJ-95] - getFriends(String id) and getFriends(String id, int page) return authenticating user's friends' timeline instead

Improvement

  • [TFJ-103] - User element is out of sync
  • [TFJ-104] - UserWithStatus element is out of sync
  • [TFJ-105] - show method should return ExtendedUser instead of Status
  • [TFJ-106] - unescape HTML entities
  • [TFJ-108] - deprecate QueryResult#getTotal()
  • [TFJ-114] - verifyCredentials() should return extended user information

New Feature

  • [TFJ-49] - support update_profile_colors method
  • [TFJ-75] - support social graph methods
  • [TFJ-83] - OAuth support
  • [TFJ-96] - support since_id with getUserTimeline
  • [TFJ-97] - support since_id with getDirectMessages and getSentDirectMessages

Twitter4J now supports OAuth authentication scheme

The time has come.
Twitter4J now supports OAuth authentication scheme in the latest build.
It's not available in the central repo yet and you can download the
latest build at :
http://yusuke.homeip.net/hudson/job/Twitter4J/lastBuild/net.homeip.yusuke$twitter4j/



Please give it a try and let me know how it goes at Twitter4J list.
The use of OAuth feature in Twitter4J is not well document at this time.
OAuthUpdate should be the best example for now.
http://yusuke.homeip.net/fisheye/browse/svn/twitter4j/trunk/src/main/java/twitter4j/examples/OAuthUpdate.java?r=210

Note that you need to register your application at twitter.com before
you dive into the OAuth feature.
http://twitter.com/oauth_clients/new

See also:
- Quick and Dirty Twitter oAuth Manual
http://docs.google.com/Doc?id=ajmd9vnthtq9_64ctxkqvfm
- OAuth FAQ
http://apiwiki.twitter.com/OAuth-FAQ


Twitter4J 1.1.8 released

Twitter4J 1.1.8 is now available for download.


This version is already available in the Maven central repository.
Here are the list of fixes included in version 1.1.8.
Recompilation of your project is suggested before you update your twitter4j library.
Release Notes - Twitter4J - Version 1.1.8

Bug

  • [TFJ-91] - null pointer exception getting user detail on users with no statuses
  • [TFJ-99] - getAuthenticatedUser() fails with TwitterException if login is done with email address and password
  • [TFJ-100] - Twitter.getUserDetail() fails with java.lang.NullPointerException
  • [TFJ-101] - getChildText() throws NullPointerException randomly

Improvement

  • [TFJ-86] - send User-Agent header
  • [TFJ-89] - System properties should win explicit setter methods
  • [TFJ-92] - introduce System properties override userid and password

New Feature

  • [TFJ-90] - support since_id with getFriendsTimeline() and getReplies()

Task

  • [TFJ-84] - add license term to each source file
  • [TFJ-85] - add JDK1.4.2 support