我尝试使用Tumblr API发布内容。尽管我的所有GET
请求都能正常运行,但POST
个请求并不合适。我用来签署请求的代码与我用于预期的Twitter API客户端的代码相同。这让我觉得我错过了一些东西而且它不是代码中的错误。
所以,我发出以下请求(我已删除密钥):
POST http://api.tumblr.com/v2/blog/i054.tumblr.com/post/reblog?id=122815544241&reblog_key=FJFgmo68
Authorization: OAuth oauth_consumer_key="MY_CONSUMER_KEY",
oauth_nonce="8a564528bb632870a22d3ca4b5872b1d",
oauth_signature="VePObL9vgiZSuY0yzH3KD%2FhdB7M%3D",
oauth_signature_method="HMAC-SHA1",
oauth_timestamp="1435942225",
oauth_token="MY_TOKEN",
oauth_version="1.0"
Content-Type: application/x-www-form-urlencoded
-- response --
401 Not Authorized
Server: nginx
Date: Fri, 03 Jul 2015 16:55:26 GMT
Content-Type: application/json; charset=utf-8
Transfer-Encoding: chunked
Connection: close
p3p: CP="Tumblr's privacy policy is available here: https://www.tumblr.com/policy/en/privacy"
{"meta":{"status":401,"msg":"Not Authorized"},"response":[]}
可能出错了什么?我做的步骤是: