0

我正在尝试使令牌无效,但出现以下异常:

+       Headers {X-AspNetMvc-Version: 3.0
xoauth_problem: parameter_absent
xoauth_parameters_absent: oauth_session_handle&oauth_token
Connection: keep-alive
Content-Length: 165
Cache-Control: private
Content-Type: text/html; charset=utf-8
Date: Thu, 16 Aug 2012 20:03:38 GMT
Server: Microsoft-IIS/7.5
X-AspNet-Version: 4.0.30319
X-Powered-By: ASP.NET

}   System.Net.WebHeaderCollection

这是代码:

Uri url = new Uri("https://XXXYYY/OAuth/InvalidateToken");
string oauthHeader = "OAuth oauth_session_handle="AAA3D&",oauth_token="SDSFSDSDF%3D",oauth_consumer_key="5512CONSUMER",oauth_nonce="0000012145o",oauth_signature="QEESIGN99$",oauth_signature_method="HMAC-SHA1",oauth_timestamp="1345141023",oauth_version="1.0"";
        HttpWebRequest webReq = (HttpWebRequest)WebRequest.Create(url);                
                webReq.Method = WebRequestMethods.Http.Get;
                webReq.Headers.Add(HttpRequestHeader.Authorization, oauthHeader);
                WebResponse response = webReq.GetResponse();
  • 请注意我确实有参数
4

0 回答 0