Twitter Java API

In my opinion, after Apple's iPhone, iPod and Amazon's Kindle, Twitter is greatest innovation of this decade. The simple but powerful innovation allows us to share our thoughts, news, and opinion to 100K plus or even 1 million users within a single click. Amazing doesn't it? How will you share your opinion transparently within 140 chars? The twitter users also has amazing power, people sharing from all over globe by using a single entity is something powerful medium.

I was drawn into Twitter world like a year ago, so far my experience with Twitter is excellent. But every things has it is own drawback, in twitter world there are some a-holes try to deceive us by following us and make us to follow them and then silently unfollow us. I want to develop a small piece of code to find this mischief. But i found an excellent site www.refollow.com to do the same thing efficiently, i recommend all to use the refollow.com to find this rogues. But anyways i did this code to understand various APIs for Twitter. One of the great and fastest Java API for Twitter is from Google but there is no good documentation. Here is step by step guide to integrate with Google java-twitter.

1. Go to http://code.google.com/p/java-twitter/

2. Download Java-Twitter-*-SNAPSHOT.jar. Java-Twitter-*-SNAPSHOT.jar depends on following JARS

commons-beanutils-1.6

commons-codec-1.2

commons-collections-3.1

commons-httpclient

commons-lang-2.4

commons-logging-1.1.1

ezmorph-1.0.6

google-collect-1.0-rc1

httpcore-4.0

httpcore-nio-4.0

joda-time-1.6

json-lib-2.2.3-jdk15

3. Here is the complicated Google's Protocol Buffers. Google uses Protocol Buffers for almost all of its internal RPC protocols and file formats. Our job is to download bunch of C++ code and convert it to Java and jar it.

4. Download protobuf*.zip and protobuf*win32.zip.

5. Unzip protobuf*.zip and proto*win32.zip, and find a proto.exe from protobuf*win32.zip.

6. Copy the file to protobuf/src/ folder.

7. Go to protobuf/java and find README.txt for step by step guide to create protobuf-java-2.0.3.jar file.

8. After adding all the above JAR files, the code development is easy and refer http://java-twitter.googlecode.com/svn/site/apidocs/index.html

9. Make sure to install Java 1.6 and set JAVA_HOME variable correctly.

Here is code to find friendship exists call.

Comments

sukumar said…
Cool. Not sure i am technical enought to try this. I tried qwitter and it doesn't seem to work that well.
Thanks Sukumar for your comment
Arjun Jayaram said…
Very useful list. It is a bit outdates since newer versions have come out for commons and protocol buffers.
Thanks Arjun. Yes, the list become little outdated.

Popular posts from this blog

Coupon Crazy

Google's Killer Application.

Uncontrolled Musing