コード例 #1
0
        public void Can_make_xauth_request()
        {
            TwitterService   service = new TwitterService(_consumerKey, _consumerSecret);
            OAuthAccessToken access  = service.GetAccessTokenWithXAuth("username", "password");

            Assert.Ignore("Test account isn't authorized for xAuth");
        }
コード例 #2
0
        private static void TestWithTweetSharpXAuth()
        {
            // OAuth Access Token Exchange
            TwitterService twitterService = new TwitterService(OAuthProperties.ConsumerKey, OAuthProperties.ConsumerKeySecret);

            twitterService.AuthenticateWith(OAuthProperties.AccessToken, OAuthProperties.AccessTokenSecret);

            Console.WriteLine("Enter Username...");
            string username = Console.ReadLine();

            Console.WriteLine("Enter Password...");
            string           password    = Console.ReadLine();
            OAuthAccessToken accessToken = twitterService.GetAccessTokenWithXAuth(username, password);

            twitterService.AuthenticateWith(accessToken.Token, accessToken.TokenSecret);
            var verifyCredentialsOptions = new VerifyCredentialsOptions {
                IncludeEntities = true
            };
            TwitterUser user = twitterService.VerifyCredentials(verifyCredentialsOptions);
        }
コード例 #3
0
 public void Can_make_xauth_request()
 {
     TwitterService service = new TwitterService(_consumerKey, _consumerSecret);
     OAuthAccessToken access = service.GetAccessTokenWithXAuth("username", "password");
     Assert.Ignore("Test account isn't authorized for xAuth");
 }