Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Authentification doc #28

Open
Anth06ny opened this issue Aug 31, 2023 · 1 comment
Open

Authentification doc #28

Anth06ny opened this issue Aug 31, 2023 · 1 comment

Comments

@Anth06ny
Copy link

Can your documentation make documentation for authentification in oAuth2

Thank you

@Anth06ny
Copy link
Author

val conf = ConfigurationBuilder()
.setOAuthConsumerKey(CONSUMER_KEY_CAT)
.setOAuthConsumerSecret(CONSUMER_SECRET_CAT)
.setOAuth2AccessToken(ACCESS_TOKEN)
.setOAuthAccessTokenSecret(ACCESS_TOKEN_SECRET)
.setDebugEnabled(true)

//Ask oAuthRequestToken
val twitter = TwitterFactory(conf.build()).instance
val oAuthRequestToken = twitter.oAuthRequestToken
println(oAuthRequestToken)
println(oAuthRequestToken.authorizationURL)

This worke, i follow the url and receive from Twitter callbak :
//oauth_token=O-3YAAAAAAABp...
//oauth_verifier=cIQde1fjyhdmBP...

So now what i have to do with this 2 key to finish configuration and post a tweet ?

Thank you for your help

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant