Retrieve Twitter AuthToken and Secret after successfully login in ASP.Net

Last Reply 9 months ago By dharmendr

Posted 9 months ago

Hi everyone,

Using the Twitter login component:

https://www.aspsnippets.com/Articles/Add-Twitter-Login-Authentication-to-website-in-ASPNet-using-C-and-VBNet.aspx

Works great!

One of our applications posts tweets to automated accounts.

How do we retreive the OAuthToken and OAuthTokenSecret values that are sent back to the DLL?

 

 

 

Posted 9 months ago

Use below code to get the logged user in the key and secret.

protected void Get(object sender, EventArgs e)
{
    TwitterConnect twitter = new TwitterConnect();
    string key = twitter.OAuthToken;
    string secret = twitter.OAuthTokenSecret;
}