Seems like every decent mobile app these days needs to integrate with Twitter somehow. And until last week that was pretty easy to do for your mobile Java application – using the Mobile Ajax libraries and Twitter client sample code.
However, as of August 1st Twitter switched from Basic Authentication to OAuth – and that makes logging into Twitter a whole lot more tricky. Now, you need to deal with certificates, SSL, handshakes, signing, token requests, authorizations, and other messiness Well, really, OAuth makes a whole lot of sense, and that is why pretty much every web service out there is moving to OAuth. So once you know how to deal with OAuth you’ll be covered for all of them.
Luckily, Ernandes Mourao Junior rose to the task and has built a Java library called Twitter API ME which makes interfacing with Twitter extremely easy. It supports OAuth (more specifically, xAuth) and runs on Java ME and Android. The code is open source under GPLv2 and the binary library is licensed under LGPLv3.
I just built a little test app that logs into Twitter and posts a tweet – all with six lines of code! Awesome. I’ve posted a brief How-To on the Twitter API ME forum.
Thanks Ernandes for a great project!