protected void sinaButton_Click(object sender, EventArgs e) { HttpGet httpRequest = HttpRequestFactory.CreateHttpRequest(Method.GET) as HttpGet; httpRequest.GetRequestToken(); string url = httpRequest.GetAuthorizationUrl(); Session["oauth_token"] = httpRequest.Token; Session["oauth_token_secret"] = httpRequest.TokenSecret; Response.Redirect(url + "&oauth_callback=http://localhost:3668/Default.aspx"); }
protected void Button6_Click(object sender, EventArgs e) { //oAuthSina oauth = new oAuthSina(); //oauth.appKey = "1421367737"; //oauth.appSecret = "2be4da41eb329b6327b7b2ac56ffbe6e"; //oauth.RequestTokenGet(); //string url = oauth.AuthorizationGet(); //new Common.Cookie().setCookie("oauth_token", oauth.token, 100000); //new Common.Cookie().setCookie("oauth_token_secret", oauth.tokenSecret, 100000); //Response.Redirect(url + "&oauth_callback=" + baseurl + "/top/microblog/record.aspx?typ=sina"); HttpGet httpRequest = HttpRequestFactory.CreateHttpRequest(Method.GET) as HttpGet; httpRequest.AppKey = "1421367737"; httpRequest.AppSecret = "2be4da41eb329b6327b7b2ac56ffbe6e"; httpRequest.GetRequestToken(); string url = httpRequest.GetAuthorizationUrl(); Session["oauth_token"] = httpRequest.Token; Session["oauth_token_secret"] = httpRequest.TokenSecret; Response.Redirect(url + "&oauth_callback=" + baseurl + "/top/groupbuy/record.aspx?typ=sina"); }