LinkedIn 使用 Hammock 时出错
我正在使用 LinkedIn Hammock ,回调后给出错误 oauth_problem=parameter_absent&oauth_parameters_absent=oauth_verifier
OAuthCredentials credentials = new OAuthCredentials();
credentials.ConsumerKey = "Consumer key";
credentials.ConsumerSecret = "Consumer secret";
credentials.Token = token1;
credentials.TokenSecret = tokenS;
string Verifier = Request.QueryString["oauth_verifier"].ToString();
credentials.Verifier = Verifier
credentials.Type = OAuthType.AccessToken;
credentials.ParameterHandling = OAuthParameterHandling.HttpAuthorizationHeader;
credentials.SignatureMethod = OAuthSignatureMethod.HmacSha1;
credentials.Version = "1.0";
RestClient client = new RestClient();
client.Authority = "https://api.linkedin.com/uas/oauth";
client.Credentials = credentials;
client.Method = WebMethod.Post;
RestRequest request = new RestRequest();
request.Path = "accessToken";
RestResponse response = client.Request(request);
string content = response.Content;
Response.Write(content);
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
尝试 request.Path = "/accessToken" 而不是 request.Path = "accessToken" (不带斜线)
Try request.Path = "/accessToken" instead of request.Path = "accessToken" (without slash)