【发布时间】:2016-03-18 23:41:17
【问题描述】:
当尝试发布状态更新到 LinkedIn 时,我收到 401 Unauthorized 错误。我将 LinkedIn 应用中的 Live Status 更改为 Live,但问题仍然存在。我尝试了http://simplelinkedin.fiftymission.net/demo/,但仍然收到 401 错误... GET 请求一切正常(获取用户个人资料数据,...)。
这是请求数据:
POST /v1/people/~/shares HTTP/1.1
Host: api.linkedin.com
Connection: close
User-Agent: CakePHP
content-type: application/x-www-form-urlencoded
x-li-format: json
Authorization: OAuth oauth_version="1.0",oauth_signature_method="HMAC-SHA1",oauth_consumer_key="2z82i0j5ahjb",oauth_token="2de47758-86e1-4684-afd3-f55a56051d2d",oauth_nonce="03aae214a19e83fe2757e8061a4b1468",oauth_timestamp="1326363432",oauth_signature="WNbKgq1FnkIgIALI%2FMfVnBHLgTg%3D"
Content-Length: 131
{"comment":"I am tesing CakePHP","content":{"title":"","submitted-url":"","submitted-image-url":""},"visibility":{"code":"anyone"}}
这是响应数据:
HTTP/1.1 401 Unauthorized
Server: Apache-Coyote/1.1
Date: Thu, 12 Jan 2012 10:17:12 GMT
Vary: *
x-li-format: json
Content-Type: application/json;charset=UTF-8
Content-Length: 230
{
"errorCode": 0,
"message": "[unauthorized]. OAU:2z82i0j5ahjb|2de47758-86e1-4684-afd3-f55a56051d2d|*01|*01:1326363432:WNbKgq1FnkIgIALI/MfVnBHLgTg=",
"requestId": "5XSUW613R2",
"status": 401,
"timestamp": 1326363433324
}
谁能帮我调试它以解决它?谢谢!
【问题讨论】: