Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

accessToken and accessTokenSecret #340

Closed
dtitov opened this Issue · 14 comments

4 participants

@dtitov

Is it possible to configure scribe like Twitter4J? I mean something like that:

oauth.consumerKey=*********************
oauth.consumerSecret=******************************************
oauth.accessToken=**************************************************
oauth.accessTokenSecret=******************************************

I can't find where to put accessToken and accessTokenSecret values generated for my application on dev.twitter.com website...

@fernandezpablo85

Check the TwitterExample

@dtitov

I did. In Twitter example you generate accessToken using service.getRequestToken();

But I generated accessToken (and accessTokenSecret) on https://dev.twitter.com

In other words, in Twitter4J I operate with four hashes: consumerKey, consumerSecret, accessToken, accessTokenSecret. I can get them in Dev Center for particular app. But in scribe Twitter example there're only two hashes: apiKey and apiSecret.

@fernandezpablo85

You cannot get access token and access token secret in any dev center. You may be able to revoke a token or something, but the access token and secret are particular to the application and need to be obtained.

@dtitov

Orly?

twitter

@fernandezpablo85

If you already have the access token and secret, you can create a Token object like this:

Token token = new Token("access_token", "access_token_secret");

And then do:

oauthService.sign(request, token);

I believe that's what you want. I would strongly advise against doing that but since you seem so determined in hardcoding your token and secret in your app, be my guest.

@dtitov

Thank you, that's exactly what I was talking about.

@pmanojvivek

What exactly is the "access_token_secret" here? Is the app secret or any other code?

@fernandezpablo85

It's in the screenshot above.

@pmanojvivek

ok Got it thanks..
One more thing, Is batch requests of facebook possible with scribe?

@fernandezpablo85

I don't know what that means, if it's a different call of the API but it includes a OAuth signature then yes.

@pmanojvivek

just FYI, https://developers.facebook.com/docs/reference/api/batch/
Its combines a number of OAuth calls into one request, It seems impossible to build such a Batch request with OAuthRequest class.. just curious..

@fernandezpablo85

That's just a request with a custom HTTP header

@imabhishek

i got access token from twitter and i want to use it for getting my timeline or others by authenticating them how to use that access token for all the request......(that means i don't want to create/get access token each time)
Hey plz help its argent.....
plz help me...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.