<< April 18, 2009 | Home | April 20, 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