Harder, Better, Faster, Stronger version of Twitter4J – 4.0.0 is now available

Please welcome Twitter4J 4.0.0.

This is a must upgrade for everyone to get ready for the forth #twitterapocalypse.
The history of Twitter API is about bit length. In the past years, tweet IDs, DM IDs, and user IDs have migrated from 32 bit integer to 64 bit integer – followed by list IDs.
List IDs to become 64-bit integers in early 2014 | Twitter Blogs

With this release, list IDs (UserList IDs in Twitter4J terminology) become long. What you need to is just drop the latest jar and rebuild your project. In most cases, your application should work as before.

Be careful if you’re storing tweets, users, lists or any objects in a persistent store. List IDs need to be mapped to 64 bit or larger integer type. And serialized form of objects are NOT compatible with previous versions.

Links:
Download
Release notes
Maven Central Repository
JavaDoc
API difference between 3.0.6 and 4.0.0

There are more epic stories to be covered with this release. But first thing comes first, please migrate.

And our work is never over.

Twitter4J now supports application-only authentication

Finally application only authentication has come. Many thanks to @komiya_atsushi!

Application only authentication is an OAuth 2.0 based technique to make API calls without getting users’ permission. To enable application only authentication, you need to explicitly set enableApplicationOnlyAuth=true in your twitter4j.properties.

For more information, check dev.twitter.com and the test case.
Application-only authentication | Twitter Developers
twitter4j/twitter4j-core/src/test/java/twitter4j/auth/ApplicationOnlyAuthTest.java at master · yusuke/twitter4j · GitHub

Application-only authentication is currently available only with the latest snapshot build.

Still want to celebrate #Twitter4J6thAnniversary? Please consider making donation.
Celebrating​ #Twitter4J6thAnniversary | Twitter4J blog

Thanks, and happy tweeting!
Yusuke

Celebrating​ #Twitter4J6thAnniversary

Can’t believe that six years have past. It’s a long story!
I released the very initial version of Twitter4J on June 7th, 2007. I got one boy(@ryunosukey) and one girl(@babyyamamoto) since then.
Here are their first tweets.

I have no idea how many applications are using Twitter4J. But surely hundreds and thousands of applications are using it. I greatly appreciate all your help. Many many changes have been made to the Twitter API including introduction of rate limitation, image upload, hashtag, retweet, annotation, list, streaming API, API 1.1 and such. Me and contributors have been working very hard to catch up with the API without breaking stride. Just like my son and daughter, Twitter4J have been beloved by many developers. I’m very proud that Twitter4J have been, and will be supporting a large number of applications / services.
This could never happen without you – Twitter4J contributors and developers using Twitter4J.

Another interesting side of Twitter4J is that the success of Twitter4J lead yet other success stories. Dealing with Web API is not a rocket science. Actually Twitter4J is a super simple library. But making thing simple is sometimes even complex. I spent huge time on designing it’s interface and architecture. And now I see many libraries based on Twitter4J out there.
weibo4j – Sina Mblog openAPI javaSDK – Google Project Hosting
API Java Client – API – Confluence
Facebook4J – A Java library for the Facebook Graph API
ts-3156/mixi4j · GitHub

Again, many thanks to Twitter4J users and contributors. Ah, you want to say thanks to me? Hit the following tweet button and/or donate via PayPal!



If you like to, send an email to yusue@mac.com with your name, your service/application name, and URL. I’ll put a link below:


Twitter4J 2.x.x is dead, long live the Twitter4J 3.0!

I hope that you are aware of the Twitter API 1.0 retirement.

With this retirement, Twitter4J 2.2.x or earlier will no longer work ever again.

But you’re lucky!
Migrating to Twitter4J 3.0 (compatible with Twitter API 1.1) is super easy. Just move on to Twitter4J 3.0.x and you’ll see compile errors where you have any compatibility issue with the API 1.1.
If you don’t get it, have a look at the migration guide.
Twitter4J – Migrating from 2.2.x to 3.0.x