V2EX
   Category:
 Java
Posted in Java on September 20th, 2008 by Xin

It was March 2007, Twitter hit everyone around me, I guess we’re just tired of long long blogging, then we found Twitter, 140 characters are enough in most of the time for random thoughts and other things. So I added similar feature to an open source project I was working on, and further more, one sexy feature of Twitter is that you can post via IM, so it’s like in a movie starred by Tony Leung Chiu Wai, when you have secrets to tell, you tell them to a hole in an old tree, then your secrets are well kept, and twitter@twitter.com could be the hole.

After done the web programming part, I was seeking for a solution to implement the IM part, and I found a Java library called Smack developed by Jive Software, which is the most feature complete Java library for XMPP/Jabber.

So I wrote a simple bot with Smack, users can add the bot to their Gtalk contacts, talk to the bot and get updates posted to the site powered by my old open source project.

One year past and many unexpected things happened to my old open source project so I paused it. However, if you’re interested in the XMPP/Jabber bot, you can download the source from its Google Code repository via SVN. Well I’m not a veteran Java programmer, there could be some problems in the source code, so all I hope is that it’s useful and working. You can expand it to suit your own use, e.g. one of my friends expanded it to a blog writer so he can update via Gtalk.