开发者

Why request statuses/update_with_media api ,but response Could not authenticate with OAuth [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 11 years ago.

I request https://upload.twitter.com/1/statuses/update_with_media.xml ,always response :

<?xml version="1.0" encoding="UTF-8" ?> 
<hash>
  <request>/1/statuses/update_with_media.xml</request> 
  <error>Could not authenticate with OAuth.</error> 
</hash>

First,get signature POST&https%3A%2F%2Fupload.twitter.com%2F1%2Fstatuses%2Fupdate_with_media.xml&oauth_callback%3Doob%26oauth_consumer_key%3DGdeHOOii4RO9zutMSnQA%26oauth_nonce%3D5804729%26oauth_signature_method%3DHMAC-SHA1%26oauth_timestamp%3D1314295310%26oauth_token%3D18774753-prAGJ6cU0tCZcFnalhLUzlwM7xGqIBlOueahLy2Cj%26oauth_version%3D1.0%26status%3D1

Secondly,create HTTP connection

POST /1/statuses/update_with_media.xml HTTP/1.1 User-Agent: themattharris' HTTP Client Authorization: OAuth oauth_consumer_key="GdeHOOii4RO9zutMSnQA", oauth_nonce="6234982",oauth_signature="AxolJLe8rKy5SBB44HxIdWRfTpY%3d", oauth_signature_method="HMAC-SHA1", oauth_timestamp="1314295916", oauth_token="18774753-prAGJ6cU0tCZcFnalhLUzlwM7xGqIBlOueahLy2Cj",oauth_version="1.0" Content-Type: m开发者_如何学Cultipart/form-data; boundary=e4f86ea7-e11a-43f4-8204-f3f520ecb9a9 Host: upload.twitter.com Content-Length: 25015 Connection: Keep-Alive

--e4f86ea7-e11a-43f4-8204-f3f520ecb9a9 Content-Disposition: form-data; name="status" Content-Type: application/x-www-form-urlencoded; charset=UTF-8 Content-Transfer-Encoding: 8bit

1

--e4f86ea7-e11a-43f4-8204-f3f520ecb9a9 Content-Disposition: form-data; name="media[]"; filename="1.jpg" Content-Type: image/jpeg; Content-Transfer-Encoding: binary

BM"

--f901ff99-f9cb-4318-a7fa-6d4bca164b4a--

Any help appreciated!

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜