Quantcast
Channel: Tweetinvi a friendly Twitter C# library
Viewing all articles
Browse latest Browse all 4126

New Post: How do I add authentication to a WFA?

$
0
0
``` private void button2_Click(object sender, EventArgs e)
    {

        var applicationCredentials = CredentialsCreator.GenerateApplicationCredentials(consumerKey, consumerSecret);
        var url = CredentialsCreator.GetAuthorizationURLForCallback(applicationCredentials, "https://tweetinvi.codeplex.com");
        Console.WriteLine("Go on : {0}", url);
        Console.WriteLine("When redirected to your website copy and paste the URL: ");

        // Enter a value like: https://tweeetinvi.codeplex.com?oauth_token={tokenValue}&oauth_verifier={verifierValue}

        var callbackURL = Console.ReadLine();

        // Here we provide the entire URL where the user has been redirected
        var newCredentials = CredentialsCreator.GetCredentialsFromCallbackURL(callbackURL, applicationCredentials);
        Console.WriteLine("Access Token = {0}", newCredentials.AccessToken);
        Console.WriteLine("Access Token Secret = {0}", newCredentials.AccessTokenSecret);

        return newCredentials;
    }
```Returns
Error 1 'CredentialsCreator' is an ambiguous reference between 'Tweetinvi.CredentialsCreator' and 'Tweetinvi.Credentials.CredentialsCreator' C:\Users\User\Documents\full-twitter-capture\Form1.cs 118 42 WindowsFormsApplication1
Error 2 The name 'consumerKey' does not exist in the current context C:\Users\User\Documents\full-twitter-capture\Form1.cs 118 92 WindowsFormsApplication1
Error 3 The name 'consumerSecret' does not exist in the current context C:\Users\User\Documents\full-twitter-capture\Form1.cs 118 105 WindowsFormsApplication1
Error 4 Since 'TweetNab.mainform.button2_Click(object, System.EventArgs)' returns void, a return keyword must not be followed by an object expression C:\Users\User\Documents\full-twitter-capture\Form1.cs 132 13 WindowsFormsApplication1

Viewing all articles
Browse latest Browse all 4126

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>