RenegadeAndy
RenegadeAndy

Reputation: 5690

JTwitter OAuth signpost example

I believe JTwitter supports OAuth to authenticate against a developer account , however i cannot get any of them working.

The JTwitter docs say signpost is the supported method - yet I cannot seem to find the OAuthSignpostClient class they use even after adding the signpost libs:

  OAuthSignpostClient client = new OAuthSignpostClient(JTWITTER_OAUTH_KEY, JTWITTER_OAUTH_SECRET, "oob");
    Twitter jtwit = new Twitter("yourtwittername", client);
    // open the authorisation page in the user's browser
    client.authorizeDesktop();
    // get the pin
    String v = client.askUser("Please enter the verification PIN from Twitter");
    client.setAuthorizationCode(v);
    // Optional: store the authorisation token details
    Object accessToken = client.getAccessToken();
    // use the API!
    jtwit.setStatus("Messing about in Java");

Has anybody code that code segment working?

Please help

Andy

Upvotes: 0

Views: 3679

Answers (2)

Daniel Winterstein
Daniel Winterstein

Reputation: 2546

The OAuthSignpostClient class is part of JTwitter and is in the same jar and package as the Twitter class. Use import winterwell.jtwitter.OAuthSignpostClient to find it.

If you can't find it, Check what version of JTwitter you have (see the version field in winterwell.jtwitter.Twitter). The current version is 1.6.3. Earlier versions might not have the signpost class.

I hope that helps.

Upvotes: 1

StackOverFlow
StackOverFlow

Reputation: 4614

Use the SHA1 checksum to verify file integrity.

http://code.google.com/p/oauth-signpost/downloads/detail?name=signpost-core-1.2.1.1.jar

May be this solution is helpful for you

Upvotes: 0

Related Questions