我得到一个401不断进一步解释什么错误是通过v2 API张贴到Tumblr时。不断得到401当试图张贴到Tumblr博客
要求低于 - 换行符被添加可读性
POST http://api.tumblr.com/v2/blog/[blog].tumblr.com/post HTTP/1.1
Content-Type: application/x-www-form-urlencoded
Host: api.tumblr.com
Content-Length: 303
body=test&
oauth_consumer_key=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx&
oauth_nonce=4712451&
oauth_signature_method=HMAC-SHA1&
oauth_timestamp=1312610497&
oauth_token=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx&
oauth_version=1.0&
type=text&
oauth_signature=ccN%2f0E%2bat42BAzdkDPJ%2ffcuMacY%3d
我得到如下回应
HTTP/1.1 401 Not Authorized
Date: Sat, 06 Aug 2011 06:01:43 GMT
Server: Apache
P3P: CP="ALL ADM DEV PSAi COM OUR OTRo STP IND ONL"
Vary: Accept-Encoding
X-Tumblr-Usec: D=38791
Content-Length: 60
Connection: close
Content-Type: application/json
{"meta":{"status":401,"msg":"Not Authorized"},"response":[]}
有谁可以发现,为什么?
我解决了这个问题,提供了一个非空白的tumblr秘密 - http://stackoverflow.com/questions/4849819/tumblr-oauth-image-post-gives-me-401-invalid-oauth-credentials/7141120# 7141120 – Ponny