Skip to content

Instantly share code, notes, and snippets.

@vkbandi
Created September 16, 2015 20:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vkbandi/a39f9ce696c9e77e2eff to your computer and use it in GitHub Desktop.
Save vkbandi/a39f9ce696c9e77e2eff to your computer and use it in GitHub Desktop.
A sample code to show how to initalize oAuthTwitter instance
oAuthTwitter oauth = new oAuthTwitter();
//Replace the vlues with the one's provided by twitter
oauth.ConsumerKey = "Your-twitter-oauth-consumerkey";
oauth.ConsumerSecret = "Your-twitter-oauth-consumersecret";
//Launches your default browser for requesting //authentication
System.Diagnostics.Process.Start(oauth.AuthorizationLinkGet());
//Copy the pin provided after you authenticating and save to a string
//I am assuming you store it in a string twitterpin
//Now the real authentication takes place
//you will exchange the authtoken and pin for Access token
oauth.AccessTokenGet(oauth.OAuthToken, twitterpin);
//remember twitterpin is the object in which we stored the //pin value
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment