Twitter test - Java Social Media

Java examples for Social Media:Twitter

Description

Twitter test

Demo Code

import twitter4j.Twitter;
import twitter4j.TwitterException;
import twitter4j.TwitterFactory;

public class Test {
    public static void main(String[] args) {
        Twitter twitter = new TwitterFactory().getInstance();
        try {/*w  w  w  .j a v  a2s. c o m*/
            boolean ok = twitter.test();
            System.out.println(ok);
        } catch (TwitterException te) {
            te.printStackTrace();
            System.out.println(te.getMessage());
            System.exit(-1);
        }
    }
}

Related Tutorials