views:

224

answers:

1

I am trying to use Oauth with jTwitter.. and get an exception while creating the Oauth signpostclient

String JTWITTER_OAUTH_KEY="GDdmIQH6jhtmLUypg82g"; String JTWITTER_OAUTH_SECRET="9zWH6qe0qG7Lc1telCn7FhUbLyVdjEaL3MO5uHxn8"; OAuthSignpostClient client = new OAuthSignpostClient(JTWITTER_OAUTH_KEY, JTWITTER_OAUTH_SECRET,"oob");

throws the following exception

Exception in thread "main" java.lang.NoSuchMethodError: oauth.signpost.AbstractOAuthConsumer.(Ljava/lang/String;Ljava/lang/String;)V at winterwell.jtwitter.OAuthSignpostClient$2.(OAuthSignpostClient.java:182) at winterwell.jtwitter.OAuthSignpostClient.init(OAuthSignpostClient.java:182) at winterwell.jtwitter.OAuthSignpostClient.(OAuthSignpostClient.java:144) at jay.twitter.HelloTwitter.main(HelloTwitter.java:16)

What am I doing wrong? Can anyone help pls.

A: 

You need to download the signpost oauth jar and add it to your classpath/project. JTwitter works with a few different oauth libraries, but the download doesn't include any of them.

By the way, itls a good idea to get your own key & secret by registering at dev.twitter.com.

Daniel Winterstein

related questions