Created
September 16, 2015 20:13
-
-
Save vkbandi/a39f9ce696c9e77e2eff to your computer and use it in GitHub Desktop.
A sample code to show how to initalize oAuthTwitter instance
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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