Beispiel #1
0
        private void OAuth()
        {
            OAuthOptions oauthOption = new OAuthOptions();
            oauthOption.Version = "1.0";

            OAuthUrlOptions authoriseOptions = new OAuthUrlOptions();
            authoriseOptions.Url = "https://api.twitter.com/oauth/authorize";
            authoriseOptions.Args = new Dictionary("force_login", "true");
            oauthOption.Authorize = authoriseOptions;

            OAuthUrlOptions requestOptions = new OAuthUrlOptions();
            requestOptions.Url = "https://api.twitter.com/oauth/request_token";
            oauthOption.Request = requestOptions;

            OAuthUrlOptions accessOptions = new OAuthUrlOptions();
            accessOptions.Url = "https://api.twitter.com/oauth/access_token";
            oauthOption.Access = accessOptions;

            oauthOption.CallbackUrl = "http://yourcallbackurl";
            oauthOption.ConsumerKey = "chameleon_encryped_consumer_key";
            oauthOption.ConsumerSecret = "chameleon_encrypted_consumer_secret";
            oauthOption.OnResult = delegate(bool success, Dictionary data)
            {
                //do something
            };

            Chameleon.PromptOauth(oauthOption);
        }
Beispiel #2
0
 /// <summary>
 /// Kicks off an Oauth 1.0 or 2.0 handshake with a remote service provider.
 /// </summary>
 public static void PromptOauth(OAuthOptions options)
 {
     return;
 }