Pages

Monday, May 31, 2010

About Twitter API

Twitter4J is a Java library for the Twitter API.
With Twitter4J, We can easily integrate our Java application with the Twitter service.

Click to Download Twitter API

example :Code to update Tweets

............
..........
public static void main(String[] args)throws TwitterException{

Twitter twitter = new TwitterFactory().getInstance(username,password);
Status status = null;
try {
status = twitter.updateStatus(statusInput);
} catch (TwitterException e) {
System.out.println("Exception while updating the status to [" + status.getText() + "].");
e.printStackTrace();
}
System.out.println("Successfully updated the status to [" + status.getText() + "].");

No comments:

Post a Comment