Hi Marcel,

Looks like you're close to getting this right. Can you share the signature
base string generated for this request?

Is there any specific reason you are also sending Cookie information?

Thanks,
Taylor

On Thu, Sep 23, 2010 at 3:39 AM, marcel <mar...@marcelrouwenhorst.nl> wrote:

> hi
>
> I get the following error when I try to post a update (http://
> api.twitter.com/1/statuses/update.json)
> {"request":"/1/statuses/update.json","error":"Incorrect signature"}
>
> I asked the user for permission to post on his behave with the
> request_token and access_token, this works just fine. But when I try
> to post an update I get the error. I can't find what's wrong. I added
> the the request and response below. I uses the net.oauth library in
> java to make the request.
>
> thanks in advance
> Marcel
>
> - >> "POST /1/statuses/update.json HTTP/1.1[EOL]"
> - >> "Authorization: OAuth oauth_token="172681734-
> FzhN9E4N01HaA2ayQxbur7Hx97857T5wtrNL56bk",
> oauth_consumer_key="kwdk6ffBkQoGejCCaBt4vQ",
> oauth_signature_method="HMAC-SHA1", oauth_timestamp="1285237466",
> oauth_nonce="7339259272017102", oauth_version="1.0",
> oauth_signature="KH%2BLmOjrm8pXxVtPnnzI37DFHfE%3D"[EOL]"
> - >> "Transfer-Encoding: chunked[EOL]"
> - >> "Host: api.twitter.com[EOL]"
> - >> "Connection: Keep-Alive[EOL]"
> - >> "User-Agent: Apache-HttpClient/4.0.1 (java 1.5)[EOL]"
> - >> "Cookie:
> _twitter_sess=BAh7CDoHaWQiJTQ1M2QwYjA3Y2Q5YWVhNWVhYTU4YTgyMzJhNmRjMDQ4Igpm
> %250AbGFzaElDOidBY3Rpb25Db250cm9sbGVyOjpGbGFzaDo6Rmxhc2hIYXNoewAG
>
> %250AOgpAdXNlZHsAOg9jcmVhdGVkX2F0bCsI0R8EPisB--717ce85d54e96a462396a77454aae15936b54bb9[EOL]"
> - >> "Cookie2: $Version=1[EOL]"
> - >> "[EOL]"
> - >> POST /1/statuses/update.json HTTP/1.1
> - >> Authorization: OAuth oauth_token="172681734-
> FzhN9E4N01HaA2ayQxbur7Hx97857T5wtrNL56bk",
> oauth_consumer_key="kwdk6ffBkQoGejCCaBt4vQ",
> oauth_signature_method="HMAC-SHA1", oauth_timestamp="1285237466",
> oauth_nonce="7339259272017102", oauth_version="1.0",
> oauth_signature="KH%2BLmOjrm8pXxVtPnnzI37DFHfE%3D"
> - >> Transfer-Encoding: chunked
> - >> Host: api.twitter.com
> - >> Connection: Keep-Alive
> - >> User-Agent: Apache-HttpClient/4.0.1 (java 1.5)
> - >> Cookie:
> _twitter_sess=BAh7CDoHaWQiJTQ1M2QwYjA3Y2Q5YWVhNWVhYTU4YTgyMzJhNmRjMDQ4Igpm
> %250AbGFzaElDOidBY3Rpb25Db250cm9sbGVyOjpGbGFzaDo6Rmxhc2hIYXNoewAG
>
> %250AOgpAdXNlZHsAOg9jcmVhdGVkX2F0bCsI0R8EPisB--717ce85d54e96a462396a77454aae15936b54bb9
> - >> Cookie2: $Version=1
> - >> "11[EOL]"
> - >> "status=firsttweet"
> - >> "[EOL]"
> - >> "0[EOL]"
> - >> "[EOL]"
>
>
> - << "HTTP/1.1 401 Unauthorized[EOL]"
> - << "Date: Thu, 23 Sep 2010 10:24:26 GMT[EOL]"
> - << "Server: hi[EOL]"
> - << "Status: 401 Unauthorized[EOL]"
> - << "WWW-Authenticate: Basic realm="Twitter API"[EOL]"
> - << "Content-Type: application/json; charset=utf-8[EOL]"
> - << "Content-Length: 67[EOL]"
> - << "Cache-Control: no-cache, max-age=300[EOL]"
> - << "Set-Cookie: k=85.119.49.19.1285237466978726; path=/;
> expires=Thu, 30-Sep-10 10:24:26 GMT; domain=.twitter.com[EOL]"
> - << "Set-Cookie: guest_id=12852374669829562; path=/; expires=Sat, 23
> Oct 2010 10:24:26 GMT[EOL]"
> 2010-09-23 12:24:27,077 DEBUG - wire                       - << "Set-
> Cookie:
> _twitter_sess=BAh7CCIKZmxhc2hJQzonQWN0aW9uQ29udHJvbGxlcjo6Rmxhc2g6OkZsYXNo
> %250ASGFzaHsABjoKQHVzZWR7ADoHaWQiJTQ1M2QwYjA3Y2Q5YWVhNWVhYTU4YTgy
>
> %250AMzJhNmRjMDQ4Og9jcmVhdGVkX2F0bCsI0R8EPisB--1164250989c7989e3a4df34f9fb7287d2b2abb48;
> domain=.twitter.com; path=/[EOL]"
> - << "Expires: Thu, 23 Sep 2010 10:29:26 GMT[EOL]"
> - << "Vary: Accept-Encoding[EOL]"
> - << "Connection: close[EOL]"
> - << "[EOL]"
> - << "{"request":"/1/statuses/update.json","error":"Incorrect
> signature"}"
>
> --
> Twitter developer documentation and resources: http://dev.twitter.com/doc
> API updates via Twitter: http://twitter.com/twitterapi
> Issues/Enhancements Tracker:
> http://code.google.com/p/twitter-api/issues/list
> Change your membership to this group:
> http://groups.google.com/group/twitter-development-talk
>

-- 
Twitter developer documentation and resources: http://dev.twitter.com/doc
API updates via Twitter: http://twitter.com/twitterapi
Issues/Enhancements Tracker: http://code.google.com/p/twitter-api/issues/list
Change your membership to this group: 
http://groups.google.com/group/twitter-development-talk

Reply via email to