Posts Tagged ‘Twitter’

Posting a tweet using Java

February 27, 2015 Leave a comment

You can’t believe, how easy and fast to tweet using java. yes, it is possible with the help of java library called ‘twiiter4j’. you can download the library from this site and use it.  consider the following code

    Twitter twitter = TwitterFactory.getSingleton();
    Status status = twitter.updateStatus(latestStatus);
    System.out.println("Successfully updated the status to [" + status.getText() + "].");

use this code in your main function. this code will post your tweet into your timeline.  find more example at . It is really easy to use and make it working with twitter4j. so enjoy java programming.

Tags: ,