with twitter

Oct 7, 2014 at 11:32 PM

I've been following the Twitter's official sign-in implementation ( and wanted to confirm whether a few steps occur when creating credentials within Tweetinvi.

My sign-in process is the typical flow seen most everywhere -> user clicks sign in button, obtain redirect url via GetAuthorizationURLForCallback(), redirect user, analyze params sent to callback, obtain access token.

Within the second step - obtaining the URL, Twitter says we should store auth_token oauth_token_secret for verification within step 4 - analyzing params. Does tweetinvi do a before and after verification anywhere, in particular within GetCredentialsFromCallbackURL() ?

Oct 8, 2014 at 7:58 PM
Edited Oct 8, 2014 at 8:11 PM
Just following up here -

I'm at step 4 and keep getting a 401 when calling GetCredentialsFromCallbackURL(). The Tweetinvi exception is "Operation is not valid due to the current state of the object." I've looked at the solutions here and basically conclude the the oauth_token & oauth_token_secret from step 2 need to be set to applicationCredentials.AuthorizationKey and applicationCredentials.AuthorizationSecret, respectively within step 4 ... right?

If so, how can I obtain both oauth_token & oauth_token_secret after calling GetAuthorizationURLForCallback() from step 2?

Thanks again
Oct 8, 2014 at 8:55 PM

Figured it out, apologies for all the postings. After obtaining the redirect URL, the AuthorizationKey and AuthorizationSecret properties are set for the applicationCredentials object. I persisted both to a temp table in the DB and lookup in step 4 - obtaining the access token.

Hopefully this helps someone down the road
Marked as answer by imlokesh on 10/8/2014 at 1:01 PM