Example #1
0
        public void TweetOnBehalfOf(string oauth_access_token, string oauth_token_secret, string postData)
        {
            HttpWebRequest request = PostTwits(oauth_consumer_key, oauth_consumer_secret, oauth_access_token, oauth_token_secret, postData);
            string         result  = OAuthHelper.getResponce(request);
            Dictionary <string, string> dcResult = OAuthUtility.GetQueryParameters(result);

            if (dcResult["status"] != "200")
            {
                this.oauth_error = result;
            }
        }
Example #2
0
        public string GetRequestToken()
        {
            HttpWebRequest request = FetchRequestToken(httpMethod.POST, oauth_consumer_key, oauth_consumer_secret);
            string         result  = getResponce(request);
            Dictionary <string, string> resultData = OAuthUtility.GetQueryParameters(result);

            if (resultData.Keys.Contains("oauth_token"))
            {
                return(resultData["oauth_token"]);
            }
            else
            {
                this.oauth_error = result;
                return("");
            }
        }
Example #3
0
        public void GetUserTwAccessToken(string oauth_token, string oauth_verifier)
        {
            HttpWebRequest request = FetchAccessToken(httpMethod.POST, oauth_consumer_key, oauth_consumer_secret, oauth_token, oauth_verifier);
            string         result  = getResponce(request);

            Dictionary <string, string> resultData = OAuthUtility.GetQueryParameters(result);

            if (resultData.Keys.Contains("oauth_token"))
            {
                this.oauth_access_token        = resultData["oauth_token"];
                this.oauth_access_token_secret = resultData["oauth_token_secret"];
                this.user_id     = resultData["user_id"];
                this.screen_name = resultData["screen_name"];
            }
            else
            {
                this.oauth_error = result;
            }
        }