Wednesday 28 March 2012

how to get the oauth_verifier by sending oauth_token

    public string AuthorizationLinkGet()
        {
            string oauth_callback="http://localhost/DataAccess.asmx";
            string ret = null;
            //string rett = null;
            string response = oAuthWebRequest(Method.POST, REQUEST_TOKEN, String.Empty,oauth_callback);
            if (response.Length > 0)
            {
                //response contains token and token secret.  We only need the token.
                //oauth_token=36d1871d-5315-499f-a256-7231fdb6a1e0&oauth_token_secret=34a6cb8e-4279-4a0b-b840-085234678ab4&oauth_callback_confirmed=true
                NameValueCollection qs = HttpUtility.ParseQueryString(response);
               
                if (qs["oauth_token"] != null)
                {
                    this.Token = qs["oauth_token"];
                    this.TokenSecret = qs["oauth_token_secret"];
                    //this.Verifier = qs["oauth_verifier"];
                    ret = AUTHORIZE + "?oauth_token=" + this.Token;
                   HttpContext.Current.Response.Redirect(ret);
                   

                }
            }
       

           
            return ret;
        }

No comments:

Post a Comment