[twitter-dev] Incorrect signature
Hello API people. I have a problem I hope someone can help me with. I have developed an OAuth class in IBM LotusScript which enables me to write tweets using background agents with the IBM Domino platform. It was a steep learning curve but the class appears to work (at least in part). Now, today I managed to get my first status update to work and in the excitement I tried my code, which Twitter responded saying it was a duplicate - fair enough, it said hello only. However, since then I can no longer get and status updates to work, I always get Incorrect signature. To check that all the basics are correct, my code allows me to perform a Token Request to https://api.twitter.com/oauth/request_token . This seems to always work and I never get signature issue. And to confirm it works further I can confirm I am getting the correct oauth_token and oauth_token_secret. The problem appears when I try to do a direct status update to https://api.twitter.com/1/statuses/update.json . I have followed the API info and so far spent two solid days but cannot repeat a successful post. Of course I have used the four required keys and secrets and verified that all the base strings are correct, signature calculations correct etc etc. I just wonder if I am sending the status=hello correctly or what... Basically I am at a loss. Can anyone help? desperation is setting in. Is there any additional info I can provide? -- Twitter developer documentation and resources: https://dev.twitter.com/doc API updates via Twitter: https://twitter.com/twitterapi Issues/Enhancements Tracker: https://code.google.com/p/twitter-api/issues/list Change your membership to this group: https://groups.google.com/forum/#!forum/twitter-development-talk
[twitter-dev] incorrect signature with get parameters
Hi again ! I'me still working on my javascript twitter client. At this time, every request i make using POST method work perfectly, but i'm experiencing some trouble using GET parameters with oauth. Here is my code to retweet a message : var parameters = [oauth_consumer_key=+consumer_key, oauth_nonce=+nonce, oauth_signature_method=HMAC-SHA1, oauth_token=+accessor.oauth_token, oauth_timestamp=+time, oauth_version=1.0. id= + id]; var baseString = getBaseString(parameters, nonce, time, GET, htts:// api.twitter.com/1/statuses/+id+.json); var signature = b64_hmac_sha1(consumer_secret + + accessor.oauth_token_secret, baseString); As i'm having the same problems with direct messages, i assume my mistake is in the parameters part or the basestring generation. This signature method perfectly works with POST (i'm currently using it for timeline and mentions). Thanks for helping me ! -- gaetan -- Twitter developer documentation and resources: https://dev.twitter.com/doc API updates via Twitter: https://twitter.com/twitterapi Issues/Enhancements Tracker: https://code.google.com/p/twitter-api/issues/list Change your membership to this group: https://groups.google.com/forum/#!forum/twitter-development-talk
[twitter-dev] Incorrect signature
Hi, I have problems with authentication when I used a methods of the API. The non autenticaded methods works fine. The error message is Message = The remote server returned an error: (401) Unauthorized. the reason it's a bad signature. I used a alls the library for .net and raise the same error. Thanks for your help. oAuthTwitter oAuth = new oAuthTwitter(); oAuth.Token = strOAuthUserTokenTest3; oAuth.TokenSecret = strOAuthUserTokenSecretTest3; Console.WriteLine(Running http://api.twitter.com/1/statuses/mentions.json?page=3 Authentication required ); string strURL2 = http://api.twitter.com/1/statuses/ mentions.json?page=3; string resultado2 = oAuth.oAuthWebRequest(oAuthTwitter.Method.GET, strURL2, string.Empty); -- Twitter developer documentation and resources: https://dev.twitter.com/doc API updates via Twitter: https://twitter.com/twitterapi Issues/Enhancements Tracker: https://code.google.com/p/twitter-api/issues/list Change your membership to this group: https://groups.google.com/forum/#!forum/twitter-development-talk
[twitter-dev] Incorrect Signature
OK, I spent the last hour searching for incorrect signature posts and did not solve my issue. When trying to post with oAuth I get Incorrect Signature. It works fine if I log in first, my script works perfectly, but if I rely on the oAuth to log me in it does not work, Incorrect Signature. Any ideas? Jay -- Twitter developer documentation and resources: https://dev.twitter.com/doc API updates via Twitter: https://twitter.com/twitterapi Issues/Enhancements Tracker: https://code.google.com/p/twitter-api/issues/list Change your membership to this group: https://groups.google.com/forum/#!forum/twitter-development-talk
[twitter-dev] Incorrect signature
Hi everybody.. Im trying to change twitter user status through my app.. I already have the acces token but when i try to post I keep reciving Incorrect signature Im using php and this is the main code: $config = array ( requestTokenURL = https://api.twitter.com/1/statuses/ update.json, requestTokenMethod = POST, signatureMethod = HMAC-SHA1, consumerKey = , consumerSecret = ** ); $requestParameters2 = array ( oauth_consumer_key = $config['consumerKey'], oauth_nonce = md5(time()), oauth_signature_method = $config['signatureMethod'], oauth_token = $oauthToken, oauth_timestamp = time(), oauth_verversion = 1.0, status = urlencode(HeyThere) ); $signatureParameters2 = array(); foreach ($requestParameters2 as $parameter2 = $value2) { $signatureParameters2[] = rfc3986_encode($parameter2) . '=' . rfc3986_encode($value2); } $signatureParameters2 = rfc3986_encode(implode('', $signatureParameters2)); $baseString = urlencode(rfc3986_encode($config['requestTokenMethod']) ..rfc3986_encode($config['requestTokenURL']) ..$signatureParameters2); $key = rfc3986_encode($config['consumerSecret']) .. rfc3986_encode($tokenSecret); $signature = base64_encode(hash_hmac('sha1', $baseString, $key, true)); $RFC3986signature = rfc3986_encode($signature); / Im olso using this function to code: function rfc3986_encode($string) { $result = rawurlencode($string); $result = str_replace('%7E', '~', $result); $result = str_replace('=', '%3D', $result); $result = str_replace('+', '%2B', $result); return $result; } //this is my header/// Authorization: OAuth oauth_consumer_key=MIEedQq2dC0ttGgZQ0x***, oauth_nonce=6c6a3cf504125e84f563c668b622, oauth_signature_method=HMAC-SHA1, oauth_timestamp=1301954345, oauth_token=114032855-6Lc1pnLLx2qhy0YrerDGDlUEucLJAPTgUpytYiPT, oauth_signature=aw2S42pl%2BXuJKgua06y8kNQ2zoI%3D, oauth_version=1.0, status=HeyThere /// thats it / I know is much to ask to see all this code but Im so stuck and the fact to be so close to have it done makes it worst hehe.. Thanks.. -- 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-dev] Incorrect Signature on OAuth POST
Hi, I know there are plenty of discussions about the incorrect signature errors but I really can't seem to find the solution. What I'm trying to do is to POST a message with the following base string and Authentication header: POST http%3A%2F%2Fapi.twitter.com%2F1%2Fstatuses%2Fupdate.json oauth_consumer_key%3Dxx %26oauth_nonce%3DNjM0MzY3MDQwNjM3Nzg1Njg2 %26oauth_signature_method%3DHMAC-SHA1 %26oauth_timestamp%3D1301082064 %26oauth_token%3D83641852-GG1Ass6MKbTV6YPhfTR0zgnv6hLchNLigW5bCXvgU %26oauth_version%3D1.0 %26status%3DPrepare%2520to%2520launch%2520this%2520summer. OAuth oauth_consumer_key=xx, oauth_nonce=NjM0MzY3MDQwNjM3Nzg1Njg2, oauth_signature_method=HMAC-SHA1, oauth_timestamp=1301082064, oauth_version=1.0, oauth_token=83641852-GG1Ass6MKbTV6YPhfTR0zgnv6hLchNLigW5bCXvgU, oauth_signature=O1q3YiJuJVqKCfWEduOxA7XW8c4%3D The content-type header is application/x-www-form-urlencoded. Is there any thing wrong with my base string or the header? I've been stuck at this point for week and tried to find the solution to no avail. Please help T-T Best Regards, KiT -- 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
Re: [twitter-dev] Incorrect signature
When making a base string, you put POST variables, HTTP query parameters, and oAuth parameters all in the bucket, sort them alphabetically, and encode all of them. So, the count needs to be in the base string (if I am recalling correctly). Personally finding http://quonos.nl/oauthTester very helpful. Evadne On Jan 17, 2011, at 03:10, Thomas wrote: Hello, I am trying to get the recent mentions with the twitter api but it returns the error Incorrect signature. Here's my PHP code: ?php $time = time() + 10800; $target = urlencode(http://api.twitter.com/1/statuses/mentions.xml? count=20); $oauth_consumer_key = urlencode(); $oauth_nonce = urlencode(sha1($time)); $oauth_signature_method = urlencode(HMAC-SHA1); $oauth_token = urlencode(); $oauth_time = $time; $oauth_version = urlencode(1.0); $result = GET$targetoauth_consumer_key%3D$oauth_consumer_key %26oauth_nonce%3D$oauth_nonce%26oauth_signature_method%3D $oauth_signature_method%26oauth_timestamp%3D$oauth_time%26oauth_token %3D$oauth_token%26oauth_version%3D$oauth_version; $consumer_token_secret = urlencode(); $oauth_token_secret = urlencode(); $combine = $consumer_token_secret$oauth_token_secret; $signature = urlencode(base64_encode(hash_hmac(sha1, $result, $combine, true))); $auth = OAuth oauth_nonce=\$oauth_nonce\, oauth_signature_method= \$oauth_signature_method\, oauth_timestamp=\$oauth_time\, oauth_consumer_key=\$oauth_consumer_key\, oauth_token=\$oauth_token \, oauth_signature=\$signature\, oauth_version=\$oauth_version\; $curl = curl_init(); curl_setopt($curl, CURLOPT_URL, http://api.twitter.com/1/statuses/ mentions.xml?count=20); curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1); curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, 0); curl_setopt($curl, CURLOPT_HTTPHEADER, array(Authorization: $auth)); curl_setopt($curl, CURLOPT_POST, true); curl_setopt($curl, CURLOPT_POSTFIELDS, $signature); $result = curl_exec($curl); echo $result; ? Am I not generating the signature correctly? -- 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
[twitter-dev] Incorrect signature
Hello, I am trying to get the recent mentions with the twitter api but it returns the error Incorrect signature. Here's my PHP code: ?php $time = time() + 10800; $target = urlencode(http://api.twitter.com/1/statuses/mentions.xml? count=20); $oauth_consumer_key = urlencode(); $oauth_nonce = urlencode(sha1($time)); $oauth_signature_method = urlencode(HMAC-SHA1); $oauth_token = urlencode(); $oauth_time = $time; $oauth_version = urlencode(1.0); $result = GET$targetoauth_consumer_key%3D$oauth_consumer_key %26oauth_nonce%3D$oauth_nonce%26oauth_signature_method%3D $oauth_signature_method%26oauth_timestamp%3D$oauth_time%26oauth_token %3D$oauth_token%26oauth_version%3D$oauth_version; $consumer_token_secret = urlencode(); $oauth_token_secret = urlencode(); $combine = $consumer_token_secret$oauth_token_secret; $signature = urlencode(base64_encode(hash_hmac(sha1, $result, $combine, true))); $auth = OAuth oauth_nonce=\$oauth_nonce\, oauth_signature_method= \$oauth_signature_method\, oauth_timestamp=\$oauth_time\, oauth_consumer_key=\$oauth_consumer_key\, oauth_token=\$oauth_token \, oauth_signature=\$signature\, oauth_version=\$oauth_version\; $curl = curl_init(); curl_setopt($curl, CURLOPT_URL, http://api.twitter.com/1/statuses/ mentions.xml?count=20); curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1); curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, 0); curl_setopt($curl, CURLOPT_HTTPHEADER, array(Authorization: $auth)); curl_setopt($curl, CURLOPT_POST, true); curl_setopt($curl, CURLOPT_POSTFIELDS, $signature); $result = curl_exec($curl); echo $result; ? Am I not generating the signature correctly? -- 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
Re: [twitter-dev] Incorrect signature for users/search using REST API
Hi Rohit, When passing spaces to in queries it is recommend you use %20. The reason is that the + is often badly encoded by OAuth libraries. Percent-encoding a space in the request is the most reliable way for the signature to be calculated. The reason why the search works for both Twitter_API and Twitter%20API is that matching is performed to the account name (not screen_name) loosely to get as many results as possible. Hope that helps, @themattharris Developer Advocate, Twitter http://twitter.com/themattharris On Thu, Dec 30, 2010 at 7:09 AM, Rohit Bansal rohitbansal.h...@gmail.comwrote: Hii Can you please share the code you are using through which you are getting the response. I am working this out using scribe in Java and able to fetch response for all API calls except possibly this one. Thanks On Thu, Dec 30, 2010 at 7:19 PM, deepa nagaraj deepa.23.naga...@gmail.com wrote: Hi... But i am getting same output for both url.. http://api.twitter.com/1/users/search.xml?q=Twitter%20API and http://api.twitter.com/1/users/search.xml?q=Twitter_API On Thu, Dec 30, 2010 at 7:00 PM, Rohit Bansal rohitbansal.h...@gmail.com wrote: The XML response I am getting: ?xml version=1.0 encoding=UTF-8? hash request/1/users/search.xml?q=Twitter%20API/request errorIncorrect signature/error /hash Request for resource which I made: http://api.twitter.com/1/users/search.xml?q=Twitter%20API Request Type: GET Replacing Twitter%20API with Twitter_API is fetching me the correct response as stated in Twitter API documentation. If I am on the correct track then perhaps we need a correction in twitter documentation here, http://dev.twitter.com/doc/get/users/search. Please correct me if Twitter%20API should also be doing well. Besides this I also need to understand why underscore in Twitter_API works..? I have already posted this issue in Twitter API Issue tracker: http://code.google.com/p/twitter-api/issues/detail?id=2021 -- 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 -- Regards, Deepa -- 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 -- 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
Re: [twitter-dev] Incorrect signature for users/search using REST API
Hii Can you please share the code you are using through which you are getting the response. I am working this out using scribe in Java and able to fetch response for all API calls except possibly this one. Thanks On Thu, Dec 30, 2010 at 7:19 PM, deepa nagaraj deepa.23.naga...@gmail.comwrote: Hi... But i am getting same output for both url.. http://api.twitter.com/1/users/search.xml?q=Twitter%20API and http://api.twitter.com/1/users/search.xml?q=Twitter_API On Thu, Dec 30, 2010 at 7:00 PM, Rohit Bansal rohitbansal.h...@gmail.comwrote: The XML response I am getting: ?xml version=1.0 encoding=UTF-8? hash request/1/users/search.xml?q=Twitter%20API/request errorIncorrect signature/error /hash Request for resource which I made: http://api.twitter.com/1/users/search.xml?q=Twitter%20API Request Type: GET Replacing Twitter%20API with Twitter_API is fetching me the correct response as stated in Twitter API documentation. If I am on the correct track then perhaps we need a correction in twitter documentation here, http://dev.twitter.com/doc/get/users/search. Please correct me if Twitter%20API should also be doing well. Besides this I also need to understand why underscore in Twitter_API works..? I have already posted this issue in Twitter API Issue tracker: http://code.google.com/p/twitter-api/issues/detail?id=2021 -- 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 -- Regards, Deepa -- 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
[twitter-dev] Incorrect signature for users/search using REST API
The XML response I am getting: ?xml version=1.0 encoding=UTF-8? hash request/1/users/search.xml?q=Twitter%20API/request errorIncorrect signature/error /hash Request for resource which I made: http://api.twitter.com/1/users/search.xml?q=Twitter%20API Request Type: GET Replacing Twitter%20API with Twitter_API is fetching me the correct response as stated in Twitter API documentation. If I am on the correct track then perhaps we need a correction in twitter documentation here, http://dev.twitter.com/doc/get/users/search. Please correct me if Twitter%20API should also be doing well. Besides this I also need to understand why underscore in Twitter_API works..? I have already posted this issue in Twitter API Issue tracker: http://code.google.com/p/twitter-api/issues/detail?id=2021 -- 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
Re: [twitter-dev] Incorrect signature for users/search using REST API
Hi... But i am getting same output for both url.. http://api.twitter.com/1/users/search.xml?q=Twitter%20API and http://api.twitter.com/1/users/search.xml?q=Twitter_API On Thu, Dec 30, 2010 at 7:00 PM, Rohit Bansal rohitbansal.h...@gmail.comwrote: The XML response I am getting: ?xml version=1.0 encoding=UTF-8? hash request/1/users/search.xml?q=Twitter%20API/request errorIncorrect signature/error /hash Request for resource which I made: http://api.twitter.com/1/users/search.xml?q=Twitter%20API Request Type: GET Replacing Twitter%20API with Twitter_API is fetching me the correct response as stated in Twitter API documentation. If I am on the correct track then perhaps we need a correction in twitter documentation here, http://dev.twitter.com/doc/get/users/search. Please correct me if Twitter%20API should also be doing well. Besides this I also need to understand why underscore in Twitter_API works..? I have already posted this issue in Twitter API Issue tracker: http://code.google.com/p/twitter-api/issues/detail?id=2021 -- 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 -- Regards, Deepa -- 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
Re: [twitter-dev] Incorrect signature while getting user time line
Now the issue solved. Thanks Twitter. Regards, George On Mon, Dec 20, 2010 at 10:20 AM, Georgooty varghese georgo...@gmail.comwrote: Dear Twitter, I didn't get a solution. Please help me. I am waiting for your reply. Regards, George On Thu, Dec 16, 2010 at 1:58 PM, Tom van der Woerdt i...@tvdw.eu wrote: They look fine, and since the rest of the requests work fine (which you said), I have to assume that it's not the signature generation. Also, since you're not the only one to mention this in the past 12 hours, I have to leave open the possibility of Twitter being the issue. However, before looking at that, please double check that the Base String matches what you are actually doing! Tom On 12/16/10 7:25 AM, Georgooty varghese wrote: Thanks twitter for your quick reply. I have make only one modification into my code. Other code changes do only when I get your reply. I have changed url for user time line http to https. Here I have copied my user time line base url and signature and base string. Please suggest to me a correct way for this. *Base URL* :oauth_consumer_key=*oauth_nonce=EF2k_xwovJInFfqoauth_signature_method=HMAC-SHA1oauth_timestamp=1292480095oauth_token=*oauth_version=1.0page=1screen_name=Sanoop_SP * Signature*:FcKenujneOtQklp6HZYDkRc7BYzelW9Fsadj324REpV1owATZgqcsx3R6FaM0qGilyBRkkP95zwNVosGoSnc *Base string*:GEThttps%3A%2F%2Fapi.twitter.com http://2Fapi.twitter.com %2F1%2Fstatuses%2Fuser_timeline.jsonoauth_consumer_key%%26oauth_nonce%3DEF2k_xwovJInFfq%26oauth_signature_method%3DHMAC-SHA1%26oauth_timestamp%3D1292480095%26oauth_token%**%26oauth_version%3D1.0%26page%3D1%26screen_name%3DSanoop_SP What mistake I have made in this. Please reply. I am waiting for your reply. Regards, George On Wed, Dec 15, 2010 at 11:21 PM, Tom van der Woerdt i...@tvdw.eu mailto:i...@tvdw.eu wrote: Hi George, There have been some changes to Twitter's API and while not all of them have been activated yet, some of them may apply to you. Incorrect signature usually means that your signature is bad. This can mean a lot of things, but if only your user_timeline part is broken, you can start by looking at these : * Make sure that the URL in the Base String does not contain the query part of an URL (= anything after (and including) the ? part of the URL) - Good: https://api.twitter.com/1/statuses/user_timeline.json - Bad: https://api.twitter.com/1/statuses/user_timeline.json?count=200 Of course, this only applies to the Base String. Making a GET request is still fine. * Make sure that you specify the correct method in the Base String. - If you are making a GET request, put GET in the Base String. * Make sure that you properly URL-encode all values in the Base String - Good: Hello%20Twitter - Bad: Hello+Twitter - (This does not really apply to user_timeline) If you checked the above and the issue is still there, please show us a sample Base String and a dump of the request you make to the Twitter API. Tom On 12/15/10 6:06 PM, Georgooty varghese wrote: Dear Twitter, I have been created a twitter application. I got xauth token for my application. I have implemented twitter functionalities like home tweets, user info, follower details, following details, user time line. These functionalities working smoothly. Also get each user time line . But Todat, usser time url is not working right now. I got incorrect signature exception.. Though usertime line qury is not working yesterday. I have no change any line code. If any change need to my coding? Anybody please help me.. I am waiting for your reply. Regards, George -- 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 -- 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
Re: [twitter-dev] Incorrect signature while getting user time line
Dear Twitter, I didn't get a solution. Please help me. I am waiting for your reply. Regards, George On Thu, Dec 16, 2010 at 1:58 PM, Tom van der Woerdt i...@tvdw.eu wrote: They look fine, and since the rest of the requests work fine (which you said), I have to assume that it's not the signature generation. Also, since you're not the only one to mention this in the past 12 hours, I have to leave open the possibility of Twitter being the issue. However, before looking at that, please double check that the Base String matches what you are actually doing! Tom On 12/16/10 7:25 AM, Georgooty varghese wrote: Thanks twitter for your quick reply. I have make only one modification into my code. Other code changes do only when I get your reply. I have changed url for user time line http to https. Here I have copied my user time line base url and signature and base string. Please suggest to me a correct way for this. *Base URL* :oauth_consumer_key=*oauth_nonce=EF2k_xwovJInFfqoauth_signature_method=HMAC-SHA1oauth_timestamp=1292480095oauth_token=*oauth_version=1.0page=1screen_name=Sanoop_SP * Signature*:FcKenujneOtQklp6HZYDkRc7BYzelW9Fsadj324REpV1owATZgqcsx3R6FaM0qGilyBRkkP95zwNVosGoSnc *Base string*:GEThttps%3A%2F%2Fapi.twitter.com http://2Fapi.twitter.com %2F1%2Fstatuses%2Fuser_timeline.jsonoauth_consumer_key%%26oauth_nonce%3DEF2k_xwovJInFfq%26oauth_signature_method%3DHMAC-SHA1%26oauth_timestamp%3D1292480095%26oauth_token%**%26oauth_version%3D1.0%26page%3D1%26screen_name%3DSanoop_SP What mistake I have made in this. Please reply. I am waiting for your reply. Regards, George On Wed, Dec 15, 2010 at 11:21 PM, Tom van der Woerdt i...@tvdw.eu mailto:i...@tvdw.eu wrote: Hi George, There have been some changes to Twitter's API and while not all of them have been activated yet, some of them may apply to you. Incorrect signature usually means that your signature is bad. This can mean a lot of things, but if only your user_timeline part is broken, you can start by looking at these : * Make sure that the URL in the Base String does not contain the query part of an URL (= anything after (and including) the ? part of the URL) - Good: https://api.twitter.com/1/statuses/user_timeline.json - Bad: https://api.twitter.com/1/statuses/user_timeline.json?count=200 Of course, this only applies to the Base String. Making a GET request is still fine. * Make sure that you specify the correct method in the Base String. - If you are making a GET request, put GET in the Base String. * Make sure that you properly URL-encode all values in the Base String - Good: Hello%20Twitter - Bad: Hello+Twitter - (This does not really apply to user_timeline) If you checked the above and the issue is still there, please show us a sample Base String and a dump of the request you make to the Twitter API. Tom On 12/15/10 6:06 PM, Georgooty varghese wrote: Dear Twitter, I have been created a twitter application. I got xauth token for my application. I have implemented twitter functionalities like home tweets, user info, follower details, following details, user time line. These functionalities working smoothly. Also get each user time line . But Todat, usser time url is not working right now. I got incorrect signature exception.. Though usertime line qury is not working yesterday. I have no change any line code. If any change need to my coding? Anybody please help me.. I am waiting for your reply. Regards, George -- 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 -- 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
Re: [twitter-dev] Incorrect signature while getting user time line
I didn't get a proper solution. Anybody please help me. Regards, George On Thu, Dec 16, 2010 at 7:11 PM, Georgooty varghese georgo...@gmail.comwrote: Ok. Thanks Tom. What wrong I have made in this. I didn't find any issue. Could u please check the issue. I am waiting for your reply. Regards, George On Thu, Dec 16, 2010 at 1:58 PM, Tom van der Woerdt i...@tvdw.eu wrote: They look fine, and since the rest of the requests work fine (which you said), I have to assume that it's not the signature generation. Also, since you're not the only one to mention this in the past 12 hours, I have to leave open the possibility of Twitter being the issue. However, before looking at that, please double check that the Base String matches what you are actually doing! Tom On 12/16/10 7:25 AM, Georgooty varghese wrote: Thanks twitter for your quick reply. I have make only one modification into my code. Other code changes do only when I get your reply. I have changed url for user time line http to https. Here I have copied my user time line base url and signature and base string. Please suggest to me a correct way for this. *Base URL* :oauth_consumer_key=*oauth_nonce=EF2k_xwovJInFfqoauth_signature_method=HMAC-SHA1oauth_timestamp=1292480095oauth_token=*oauth_version=1.0page=1screen_name=Sanoop_SP * Signature*:FcKenujneOtQklp6HZYDkRc7BYzelW9Fsadj324REpV1owATZgqcsx3R6FaM0qGilyBRkkP95zwNVosGoSnc *Base string*:GEThttps%3A%2F%2Fapi.twitter.com http://2Fapi.twitter.com %2F1%2Fstatuses%2Fuser_timeline.jsonoauth_consumer_key%%26oauth_nonce%3DEF2k_xwovJInFfq%26oauth_signature_method%3DHMAC-SHA1%26oauth_timestamp%3D1292480095%26oauth_token%**%26oauth_version%3D1.0%26page%3D1%26screen_name%3DSanoop_SP What mistake I have made in this. Please reply. I am waiting for your reply. Regards, George On Wed, Dec 15, 2010 at 11:21 PM, Tom van der Woerdt i...@tvdw.eu mailto:i...@tvdw.eu wrote: Hi George, There have been some changes to Twitter's API and while not all of them have been activated yet, some of them may apply to you. Incorrect signature usually means that your signature is bad. This can mean a lot of things, but if only your user_timeline part is broken, you can start by looking at these : * Make sure that the URL in the Base String does not contain the query part of an URL (= anything after (and including) the ? part of the URL) - Good: https://api.twitter.com/1/statuses/user_timeline.json - Bad: https://api.twitter.com/1/statuses/user_timeline.json?count=200 Of course, this only applies to the Base String. Making a GET request is still fine. * Make sure that you specify the correct method in the Base String. - If you are making a GET request, put GET in the Base String. * Make sure that you properly URL-encode all values in the Base String - Good: Hello%20Twitter - Bad: Hello+Twitter - (This does not really apply to user_timeline) If you checked the above and the issue is still there, please show us a sample Base String and a dump of the request you make to the Twitter API. Tom On 12/15/10 6:06 PM, Georgooty varghese wrote: Dear Twitter, I have been created a twitter application. I got xauth token for my application. I have implemented twitter functionalities like home tweets, user info, follower details, following details, user time line. These functionalities working smoothly. Also get each user time line . But Todat, usser time url is not working right now. I got incorrect signature exception.. Though usertime line qury is not working yesterday. I have no change any line code. If any change need to my coding? Anybody please help me.. I am waiting for your reply. Regards, George -- 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 -- 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
Re: [twitter-dev] Incorrect signature while getting user time line
They look fine, and since the rest of the requests work fine (which you said), I have to assume that it's not the signature generation. Also, since you're not the only one to mention this in the past 12 hours, I have to leave open the possibility of Twitter being the issue. However, before looking at that, please double check that the Base String matches what you are actually doing! Tom On 12/16/10 7:25 AM, Georgooty varghese wrote: Thanks twitter for your quick reply. I have make only one modification into my code. Other code changes do only when I get your reply. I have changed url for user time line http to https. Here I have copied my user time line base url and signature and base string. Please suggest to me a correct way for this. *Base URL* :oauth_consumer_key=*oauth_nonce=EF2k_xwovJInFfqoauth_signature_method=HMAC-SHA1oauth_timestamp=1292480095oauth_token=*oauth_version=1.0page=1screen_name=Sanoop_SP * Signature*:FcKenujneOtQklp6HZYDkRc7BYzelW9Fsadj324REpV1owATZgqcsx3R6FaM0qGilyBRkkP95zwNVosGoSnc *Base string*:GEThttps%3A%2F%2Fapi.twitter.com http://2Fapi.twitter.com%2F1%2Fstatuses%2Fuser_timeline.jsonoauth_consumer_key%%26oauth_nonce%3DEF2k_xwovJInFfq%26oauth_signature_method%3DHMAC-SHA1%26oauth_timestamp%3D1292480095%26oauth_token%**%26oauth_version%3D1.0%26page%3D1%26screen_name%3DSanoop_SP What mistake I have made in this. Please reply. I am waiting for your reply. Regards, George On Wed, Dec 15, 2010 at 11:21 PM, Tom van der Woerdt i...@tvdw.eu mailto:i...@tvdw.eu wrote: Hi George, There have been some changes to Twitter's API and while not all of them have been activated yet, some of them may apply to you. Incorrect signature usually means that your signature is bad. This can mean a lot of things, but if only your user_timeline part is broken, you can start by looking at these : * Make sure that the URL in the Base String does not contain the query part of an URL (= anything after (and including) the ? part of the URL) - Good: https://api.twitter.com/1/statuses/user_timeline.json - Bad: https://api.twitter.com/1/statuses/user_timeline.json?count=200 Of course, this only applies to the Base String. Making a GET request is still fine. * Make sure that you specify the correct method in the Base String. - If you are making a GET request, put GET in the Base String. * Make sure that you properly URL-encode all values in the Base String - Good: Hello%20Twitter - Bad: Hello+Twitter - (This does not really apply to user_timeline) If you checked the above and the issue is still there, please show us a sample Base String and a dump of the request you make to the Twitter API. Tom On 12/15/10 6:06 PM, Georgooty varghese wrote: Dear Twitter, I have been created a twitter application. I got xauth token for my application. I have implemented twitter functionalities like home tweets, user info, follower details, following details, user time line. These functionalities working smoothly. Also get each user time line . But Todat, usser time url is not working right now. I got incorrect signature exception.. Though usertime line qury is not working yesterday. I have no change any line code. If any change need to my coding? Anybody please help me.. I am waiting for your reply. Regards, George -- 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 -- 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
Re: [twitter-dev] Incorrect signature while getting user time line
Ok. Thanks Tom. What wrong I have made in this. I didn't find any issue. Could u please check the issue. I am waiting for your reply. Regards, George On Thu, Dec 16, 2010 at 1:58 PM, Tom van der Woerdt i...@tvdw.eu wrote: They look fine, and since the rest of the requests work fine (which you said), I have to assume that it's not the signature generation. Also, since you're not the only one to mention this in the past 12 hours, I have to leave open the possibility of Twitter being the issue. However, before looking at that, please double check that the Base String matches what you are actually doing! Tom On 12/16/10 7:25 AM, Georgooty varghese wrote: Thanks twitter for your quick reply. I have make only one modification into my code. Other code changes do only when I get your reply. I have changed url for user time line http to https. Here I have copied my user time line base url and signature and base string. Please suggest to me a correct way for this. *Base URL* :oauth_consumer_key=*oauth_nonce=EF2k_xwovJInFfqoauth_signature_method=HMAC-SHA1oauth_timestamp=1292480095oauth_token=*oauth_version=1.0page=1screen_name=Sanoop_SP * Signature*:FcKenujneOtQklp6HZYDkRc7BYzelW9Fsadj324REpV1owATZgqcsx3R6FaM0qGilyBRkkP95zwNVosGoSnc *Base string*:GEThttps%3A%2F%2Fapi.twitter.com http://2Fapi.twitter.com %2F1%2Fstatuses%2Fuser_timeline.jsonoauth_consumer_key%%26oauth_nonce%3DEF2k_xwovJInFfq%26oauth_signature_method%3DHMAC-SHA1%26oauth_timestamp%3D1292480095%26oauth_token%**%26oauth_version%3D1.0%26page%3D1%26screen_name%3DSanoop_SP What mistake I have made in this. Please reply. I am waiting for your reply. Regards, George On Wed, Dec 15, 2010 at 11:21 PM, Tom van der Woerdt i...@tvdw.eu mailto:i...@tvdw.eu wrote: Hi George, There have been some changes to Twitter's API and while not all of them have been activated yet, some of them may apply to you. Incorrect signature usually means that your signature is bad. This can mean a lot of things, but if only your user_timeline part is broken, you can start by looking at these : * Make sure that the URL in the Base String does not contain the query part of an URL (= anything after (and including) the ? part of the URL) - Good: https://api.twitter.com/1/statuses/user_timeline.json - Bad: https://api.twitter.com/1/statuses/user_timeline.json?count=200 Of course, this only applies to the Base String. Making a GET request is still fine. * Make sure that you specify the correct method in the Base String. - If you are making a GET request, put GET in the Base String. * Make sure that you properly URL-encode all values in the Base String - Good: Hello%20Twitter - Bad: Hello+Twitter - (This does not really apply to user_timeline) If you checked the above and the issue is still there, please show us a sample Base String and a dump of the request you make to the Twitter API. Tom On 12/15/10 6:06 PM, Georgooty varghese wrote: Dear Twitter, I have been created a twitter application. I got xauth token for my application. I have implemented twitter functionalities like home tweets, user info, follower details, following details, user time line. These functionalities working smoothly. Also get each user time line . But Todat, usser time url is not working right now. I got incorrect signature exception.. Though usertime line qury is not working yesterday. I have no change any line code. If any change need to my coding? Anybody please help me.. I am waiting for your reply. Regards, George -- 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 -- 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
Re: [twitter-dev] Incorrect signature while getting user time line
Hi George, There have been some changes to Twitter's API and while not all of them have been activated yet, some of them may apply to you. Incorrect signature usually means that your signature is bad. This can mean a lot of things, but if only your user_timeline part is broken, you can start by looking at these : * Make sure that the URL in the Base String does not contain the query part of an URL (= anything after (and including) the ? part of the URL) - Good: https://api.twitter.com/1/statuses/user_timeline.json - Bad: https://api.twitter.com/1/statuses/user_timeline.json?count=200 Of course, this only applies to the Base String. Making a GET request is still fine. * Make sure that you specify the correct method in the Base String. - If you are making a GET request, put GET in the Base String. * Make sure that you properly URL-encode all values in the Base String - Good: Hello%20Twitter - Bad: Hello+Twitter - (This does not really apply to user_timeline) If you checked the above and the issue is still there, please show us a sample Base String and a dump of the request you make to the Twitter API. Tom On 12/15/10 6:06 PM, Georgooty varghese wrote: Dear Twitter, I have been created a twitter application. I got xauth token for my application. I have implemented twitter functionalities like home tweets, user info, follower details, following details, user time line. These functionalities working smoothly. Also get each user time line . But Todat, usser time url is not working right now. I got incorrect signature exception.. Though usertime line qury is not working yesterday. I have no change any line code. If any change need to my coding? Anybody please help me.. I am waiting for your reply. Regards, George -- 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
Re: [twitter-dev] Incorrect signature while getting user time line
Thanks twitter for your quick reply. I have make only one modification into my code. Other code changes do only when I get your reply. I have changed url for user time line http to https. Here I have copied my user time line base url and signature and base string. Please suggest to me a correct way for this. *Base URL*:oauth_consumer_key=*oauth_nonce=EF2k_xwovJInFfqoauth_signature_method=HMAC-SHA1oauth_timestamp=1292480095oauth_token=*oauth_version=1.0page=1screen_name=Sanoop_SP * Signature*:FcKenujneOtQklp6HZYDkRc7BYzelW9Fsadj324REpV1owATZgqcsx3R6FaM0qGilyBRkkP95zwNVosGoSnc *Base string*:GEThttps%3A%2F%2Fapi.twitter.com%2F1%2Fstatuses%2Fuser_timeline.jsonoauth_consumer_key%%26oauth_nonce%3DEF2k_xwovJInFfq%26oauth_signature_method%3DHMAC-SHA1%26oauth_timestamp%3D1292480095%26oauth_token%**%26oauth_version%3D1.0%26page%3D1%26screen_name%3DSanoop_SP What mistake I have made in this. Please reply. I am waiting for your reply. Regards, George On Wed, Dec 15, 2010 at 11:21 PM, Tom van der Woerdt i...@tvdw.eu wrote: Hi George, There have been some changes to Twitter's API and while not all of them have been activated yet, some of them may apply to you. Incorrect signature usually means that your signature is bad. This can mean a lot of things, but if only your user_timeline part is broken, you can start by looking at these : * Make sure that the URL in the Base String does not contain the query part of an URL (= anything after (and including) the ? part of the URL) - Good: https://api.twitter.com/1/statuses/user_timeline.json - Bad: https://api.twitter.com/1/statuses/user_timeline.json?count=200 Of course, this only applies to the Base String. Making a GET request is still fine. * Make sure that you specify the correct method in the Base String. - If you are making a GET request, put GET in the Base String. * Make sure that you properly URL-encode all values in the Base String - Good: Hello%20Twitter - Bad: Hello+Twitter - (This does not really apply to user_timeline) If you checked the above and the issue is still there, please show us a sample Base String and a dump of the request you make to the Twitter API. Tom On 12/15/10 6:06 PM, Georgooty varghese wrote: Dear Twitter, I have been created a twitter application. I got xauth token for my application. I have implemented twitter functionalities like home tweets, user info, follower details, following details, user time line. These functionalities working smoothly. Also get each user time line . But Todat, usser time url is not working right now. I got incorrect signature exception.. Though usertime line qury is not working yesterday. I have no change any line code. If any change need to my coding? Anybody please help me.. I am waiting for your reply. Regards, George -- 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 -- 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-dev] incorrect signature
I wrote a code in windows phone 7 works with twitter it can get the user timeline and favorite but for direct message,home timeline and replies it has an error incorrect signature what should I do ? my base string for home timeline is:GEThttps%3A%2F%2Fapi.twitter.com %2F1%2Fstatuses%2Fhome_timeline.xmloauth_consumer_key %3D0MgmrMkA0R1iqf7mhjYdA%26oauth_nonce%3D2Dc9aMNq1Xnq5ksvx %26oauth_signature_method%3DHMAC-SHA1%26oauth_timestamp %3D1291814196%26oauth_token %3D218018015-4ny4ef2qNTBzjbJQVzbHwwxdZiZlWrGzjUTVX3bw%26oauth_version %3D1.0 can anyone help me plz? -- 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-dev] Incorrect signature
Hi In my android app I can make calls to Twitter api immediately after I login. I am using same instance of OAuthConsumer. But when I create OAuthconsumer for subsequent call and use setTokenWithSecret I get Incorrect signature error. I spent few hours trying to debug but no luck... any help is appreciated. Following is code ...in onnewIntent if statement 1== 1 works but I get Incorrect signature error If I call verify method on Twitter adapter private static String TAG = OAuthForTwitter; private CommonsHttpOAuthConsumer httpOauthConsumer; private OAuthProvider httpOauthprovider; public final static String consumerKey = ; public final static String consumerSecret = ; private final String CALLBACKURL = myapp://mainactivity; @Override protected void onNewIntent(Intent intent) { super.onNewIntent(intent); Log.d(TAG, onNewIntent); Uri uri = intent.getData(); if (uri != null uri.toString().startsWith(CALLBACKURL)) { String verifier = uri .getQueryParameter(oauth.signpost.OAuth.OAUTH_VERIFIER); Log.d(TAG, onNewIntent + verifier + verifier); try { httpOauthprovider.retrieveAccessToken(httpOauthConsumer, verifier); String userKey = httpOauthConsumer.getToken(); String userSecret = httpOauthConsumer.getConsumerSecret(); if (1 == 1) { String surl = http://api.twitter.com/1/account/ verify_credentials.xml; HttpGet request = null; HttpClient httpClient = null; HttpResponse response = null; request = new HttpGet(surl); httpOauthConsumer.sign(request); System.out.println(Sending request to Twitter...); httpClient = new DefaultHttpClient(); response = httpClient.execute(request); String sresponse = parseResponseToString(response); Log.d(TAG, sresponse); } else { TwitterAdapter adapter = new TwitterAdapter(null, consumerKey, consumerSecret, userKey, userSecret); String s = adapter.VerifyUser(); Log.d(TAG, s); } } catch (Exception e) { Log.d(TAG, onNewIntent error + e.getMessage()); } } } @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); doOauth(); } private void doOauth() { try { httpOauthConsumer = new CommonsHttpOAuthConsumer(consumerKey, consumerSecret); httpOauthprovider = new DefaultOAuthProvider( http://twitter.com/oauth/request_token;, http://twitter.com/oauth/access_token;, http://twitter.com/oauth/authorize;); String authUrl = httpOauthprovider.retrieveRequestToken( httpOauthConsumer, CALLBACKURL); this.startActivity(new Intent(Intent.ACTION_VIEW, Uri .parse(authUrl))); Log.d(TAG, sent doOauth); } catch (Exception e) { Toast.makeText(this, e.getMessage(), Toast.LENGTH_LONG).show(); } Log.d(TAG, doOauth Complete); } public class TwitterAdapter { oauth.signpost.commonshttp.CommonsHttpOAuthConsumer httpOauthConsumer; public TwitterAdapter(String username, String consumerkey,String consumersecret, String accesstoken, String accesssecret) { httpOauthConsumer = new CommonsHttpOAuthConsumer(consumerkey, consumersecret); httpOauthConsumer.setTokenWithSecret(accesstoken, consumersecret); } public String VerifyUser() throws ClientProtocolException, IOException, OAuthMessageSignerException, OAuthExpectationFailedException, OAuthCommunicationException { String surl = http://api.twitter.com/1/account/ verify_credentials.xml; HttpGet request = null; HttpClient httpClient = null; HttpResponse response = null; request = new HttpGet(surl); httpOauthConsumer.sign(request); System.out.println(Sending request to Twitter...); httpClient = new DefaultHttpClient(); response = httpClient.execute(request); return parseResponseToString(response); } } -- 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
Re: [twitter-dev] Incorrect signature while getting home tweets
Thank u twitter..Thank u very much. Now the issue was resolved Regards, George On Mon, Oct 18, 2010 at 8:15 PM, Taylor Singletary taylorsinglet...@twitter.com wrote: When using headers, you need to wrap each value in quotes. The authorization header should contain only oauth_* parameters, not any additional query parameters that may have been part of your request. Here's an example of the same request you're trying to make (with different keys, but the same basic request). Note the format of the authorization header. *Signature Base String* GEThttp%3A%2F%2Fapi.twitter.com %2F1%2Fstatuses%2Fhome_timeline.jsonoauth_consumer_key%3Dri8JxYK2ddwSV5xIUfNNvQ%26oauth_nonce%3DaZj92w9Wna0lSdL8RsGuNPi7YWyLPaVxTX5k1Xqo%26oauth_signature_method%3DHMAC-SHA1%26oauth_timestamp%3D1287412992%26oauth_token%3D819797-torCkTs0XK7H2Y2i1ee5iofqkMC4p7aayeEXRTmlw%26oauth_version%3D1.0%26page%3D1 *Authorization Header* OAuth oauth_nonce=aZj92w9Wna0lSdL8RsGuNPi7YWyLPaVxTX5k1Xqo, oauth_signature_method=HMAC-SHA1, oauth_timestamp=1287412992, oauth_consumer_key=ri8JxYK2ddwSV5xIUfNNvQ, oauth_token=819797-torCkTs0XK7H2Y2i1ee5iofqkMC4p7aayeEXRTmlw, oauth_signature=Cucyk%2FMx0saSsJA%2B79fe29HZu9Q%3D, oauth_version=1.0 *Executed URL* http://api.twitter.com/1/statuses/home_timeline.json?page=1 Taylor On Mon, Oct 18, 2010 at 6:04 AM, Georgooty varghese georgo...@gmail.comwrote: could you please help me .. I am waiting for your reply... On Mon, Oct 18, 2010 at 1:39 PM, Georgooty varghese georgo...@gmail.comwrote: Now I set to http header name is Authorization header value = oauth_consumer_key=**,oauth_nonce=b8qoVIxfQyEOOgu6vHjN215,oauth_signature_method=HMAC-SHA1, oauth_timestamp=1287389017,oauth_token=*,oauth_version=1.0,page=1 ,oauth_signature=cY%2F7W%2FuLWCidUD7KziKFwOcM9RI%3D http req url = http://api.twitter.com/1/statuses/home_timeline.json?page=1 But Its not working {error:Could not authenticate you.,request:/1/statuses/home_timeline.json?page=1} I have posted a tweet successfully in to twitter server using query string authentication. The followers/following url's working fine using query string auth params. B Home tweets and credential url was not working. Could u please help me .. I am waiting for your response. On Sat, Oct 16, 2010 at 4:08 PM, Tom van der Woerdt i...@tvdw.euwrote: The syntax of that header is wrong. Please look at http://dev.twitter.com/pages/auth for the correct syntax. Tom On 10/16/10 9:23 AM, Georgooty varghese wrote: * Now I set to Http header value Header name = Authorization value = http://api.twitter.com/1/statuses/home_timeline.json?oauth_consumer_key=*oauth_nonce=QyRr PmridwwSG6oEsr4EIoauth_signature_method=HMAC-SHA1oauth_timestamp=1287212752oauth_token=***oauth_version=1.0oauth_signature=WMYyqUYpD4lIfe8f3v3u1o2r2uk%3D Now i got {error:Could not authenticate you.,request:/1/statuses/home_timeline.json} exception message. What can I do for resolve this exception. On Thu, Oct 14, 2010 at 7:30 PM, Taylor Singletary taylorsinglet...@twitter.com mailto:taylorsinglet...@twitter.com wrote: Without getting to deep into this, some advice: * Use HTTP header based authentication instead of attaching OAuth parameters to the query string. It makes it much more difficult to receive assistance from others when you use query-string based auth and increases the chances of an encoding error exponentially. * Avoid strange characters in an oauth_nonce. When possible, avoid the ~ character entirely -- depending on the language and libraries you are using, some are less spec compliant than others on characters like tilde * That you were able to negotiate oauth_tokens through xAuth is a good sign that your code does something right. POSTs are harder than GETs. There must be something simple wrong with your GET. Look very closely. Compare to the spec if necessary. Compare to other code that produces the correct results. Taylor On Thu, Oct 14, 2010 at 4:06 AM, Georgooty varghese georgo...@gmail.com mailto:georgo...@gmail.com wrote: Before I have implemented a twitter client in C# using xAuth authentication . At that application I have used xauth params for each url signin. Any problem I didn't get. That aclient application works fine. Now I have changed language C# to C. I have used liboauth library. I got oauth_token and oauth_token_secret values successfully. Then I have try to get home tweets. But i got incorrect signature. Base URL -- GEThttp%3A%2F%2Fapi.twitter.com http://2Fapi.twitter.com %2F1%2Fstatuses%2Fhome_timeline.jsonoauth_consumer_key%3DOm
Re: [twitter-dev] Incorrect signature while getting home tweets
Now I set to http header name is Authorization header value = oauth_consumer_key=**,oauth_nonce=b8qoVIxfQyEOOgu6vHjN215,oauth_signature_method=HMAC-SHA1, oauth_timestamp=1287389017,oauth_token=*,oauth_version=1.0,page=1 ,oauth_signature=cY%2F7W%2FuLWCidUD7KziKFwOcM9RI%3D http req url = http://api.twitter.com/1/statuses/home_timeline.json?page=1 But Its not working {error:Could not authenticate you.,request:/1/statuses/home_timeline.json?page=1} I have posted a tweet successfully in to twitter server using query string authentication. The followers/following url's working fine using query string auth params. B Home tweets and credential url was not working. Could u please help me .. I am waiting for your response. On Sat, Oct 16, 2010 at 4:08 PM, Tom van der Woerdt i...@tvdw.eu wrote: The syntax of that header is wrong. Please look at http://dev.twitter.com/pages/auth for the correct syntax. Tom On 10/16/10 9:23 AM, Georgooty varghese wrote: * Now I set to Http header value Header name = Authorization value = http://api.twitter.com/1/statuses/home_timeline.json?oauth_consumer_key=*oauth_nonce=QyRr PmridwwSG6oEsr4EIoauth_signature_method=HMAC-SHA1oauth_timestamp=1287212752oauth_token=***oauth_version=1.0oauth_signature=WMYyqUYpD4lIfe8f3v3u1o2r2uk%3D Now i got {error:Could not authenticate you.,request:/1/statuses/home_timeline.json} exception message. What can I do for resolve this exception. On Thu, Oct 14, 2010 at 7:30 PM, Taylor Singletary taylorsinglet...@twitter.com mailto:taylorsinglet...@twitter.com wrote: Without getting to deep into this, some advice: * Use HTTP header based authentication instead of attaching OAuth parameters to the query string. It makes it much more difficult to receive assistance from others when you use query-string based auth and increases the chances of an encoding error exponentially. * Avoid strange characters in an oauth_nonce. When possible, avoid the ~ character entirely -- depending on the language and libraries you are using, some are less spec compliant than others on characters like tilde * That you were able to negotiate oauth_tokens through xAuth is a good sign that your code does something right. POSTs are harder than GETs. There must be something simple wrong with your GET. Look very closely. Compare to the spec if necessary. Compare to other code that produces the correct results. Taylor On Thu, Oct 14, 2010 at 4:06 AM, Georgooty varghese georgo...@gmail.com mailto:georgo...@gmail.com wrote: Before I have implemented a twitter client in C# using xAuth authentication . At that application I have used xauth params for each url signin. Any problem I didn't get. That aclient application works fine. Now I have changed language C# to C. I have used liboauth library. I got oauth_token and oauth_token_secret values successfully. Then I have try to get home tweets. But i got incorrect signature. Base URL -- GEThttp%3A%2F%2Fapi.twitter.com http://2Fapi.twitter.com %2F1%2Fstatuses%2Fhome_timeline.jsonoauth_consumer_key%3DOm TQVOKDomNbrHuuudS4Q%26oauth_nonce%3DuQTDMWP-6tFdwTAbDwiHeyrP7NEZ%26oauth_signature_method%3DHMAC-SH A1%26oauth_timestamp%3D1287053858%26oauth_token%3D144717423-P3to4wvZPFsgrIQWBAZPjlEAm39tfEtaao7HQWA7%26oauth_version%3D1.0 Signature - FcKenujneOtQklp6HZYDkRc7BYzelW9Fsadj324REdirvhD970MRu oQxPM2uOfzocpkRT3m0LKn0HPDcKkM URL -- http://api.twitter.com/1/statuses/home_timeline.json?oauth_consumer_key=OmTQVOKDomNbrHuuudS4Qo http://api.twitter.com/1/statuses/home_timeline.json?oauth_consumer_key=OmTQVOKDomNbrHuuudS4Qo auth_nonce=uQTDMWP-6tFdwTAbDwiHeyrP7NEZoauth_signature_method=HMAC-SHA1oauth_timestamp=1287053858 oauth_token=144717423-P3to4wvZPFsgrIQWBAZPjlEAm39tfEtaao7HQWA7oauth_version=1.0oauth_signature=wgRPZqaIJU%2BrkHOSAN99JreWLr4%3D Error response look like below. --- Header received header name:Date Value:Thu, 14 Oct 2010 10:57:39 GMT NN 2010-10-14 16:27:39.700 Header received header name:Server Value:hi NN 2010-10-14 16:27:39.700 Header received header name:Status Value:401 Unauthorized NN 2010-10-14 16:27:39.700 Header received header name:WWW-Authenticate Value:Basic realm=Twitter API NN 2010-10-14 16:27:39.700 Header received header name:Content-Type Value:application/json; charset=utf-8 NN 2010-10-14 16:27:39.700 Header received header
Re: [twitter-dev] Incorrect signature while getting home tweets
could you please help me .. I am waiting for your reply... On Mon, Oct 18, 2010 at 1:39 PM, Georgooty varghese georgo...@gmail.comwrote: Now I set to http header name is Authorization header value = oauth_consumer_key=**,oauth_nonce=b8qoVIxfQyEOOgu6vHjN215,oauth_signature_method=HMAC-SHA1, oauth_timestamp=1287389017,oauth_token=*,oauth_version=1.0,page=1 ,oauth_signature=cY%2F7W%2FuLWCidUD7KziKFwOcM9RI%3D http req url = http://api.twitter.com/1/statuses/home_timeline.json?page=1 But Its not working {error:Could not authenticate you.,request:/1/statuses/home_timeline.json?page=1} I have posted a tweet successfully in to twitter server using query string authentication. The followers/following url's working fine using query string auth params. B Home tweets and credential url was not working. Could u please help me .. I am waiting for your response. On Sat, Oct 16, 2010 at 4:08 PM, Tom van der Woerdt i...@tvdw.eu wrote: The syntax of that header is wrong. Please look at http://dev.twitter.com/pages/auth for the correct syntax. Tom On 10/16/10 9:23 AM, Georgooty varghese wrote: * Now I set to Http header value Header name = Authorization value = http://api.twitter.com/1/statuses/home_timeline.json?oauth_consumer_key=*oauth_nonce=QyRr PmridwwSG6oEsr4EIoauth_signature_method=HMAC-SHA1oauth_timestamp=1287212752oauth_token=***oauth_version=1.0oauth_signature=WMYyqUYpD4lIfe8f3v3u1o2r2uk%3D Now i got {error:Could not authenticate you.,request:/1/statuses/home_timeline.json} exception message. What can I do for resolve this exception. On Thu, Oct 14, 2010 at 7:30 PM, Taylor Singletary taylorsinglet...@twitter.com mailto:taylorsinglet...@twitter.com wrote: Without getting to deep into this, some advice: * Use HTTP header based authentication instead of attaching OAuth parameters to the query string. It makes it much more difficult to receive assistance from others when you use query-string based auth and increases the chances of an encoding error exponentially. * Avoid strange characters in an oauth_nonce. When possible, avoid the ~ character entirely -- depending on the language and libraries you are using, some are less spec compliant than others on characters like tilde * That you were able to negotiate oauth_tokens through xAuth is a good sign that your code does something right. POSTs are harder than GETs. There must be something simple wrong with your GET. Look very closely. Compare to the spec if necessary. Compare to other code that produces the correct results. Taylor On Thu, Oct 14, 2010 at 4:06 AM, Georgooty varghese georgo...@gmail.com mailto:georgo...@gmail.com wrote: Before I have implemented a twitter client in C# using xAuth authentication . At that application I have used xauth params for each url signin. Any problem I didn't get. That aclient application works fine. Now I have changed language C# to C. I have used liboauth library. I got oauth_token and oauth_token_secret values successfully. Then I have try to get home tweets. But i got incorrect signature. Base URL -- GEThttp%3A%2F%2Fapi.twitter.com http://2Fapi.twitter.com %2F1%2Fstatuses%2Fhome_timeline.jsonoauth_consumer_key%3DOm TQVOKDomNbrHuuudS4Q%26oauth_nonce%3DuQTDMWP-6tFdwTAbDwiHeyrP7NEZ%26oauth_signature_method%3DHMAC-SH A1%26oauth_timestamp%3D1287053858%26oauth_token%3D144717423-P3to4wvZPFsgrIQWBAZPjlEAm39tfEtaao7HQWA7%26oauth_version%3D1.0 Signature - FcKenujneOtQklp6HZYDkRc7BYzelW9Fsadj324REdirvhD970MRu oQxPM2uOfzocpkRT3m0LKn0HPDcKkM URL -- http://api.twitter.com/1/statuses/home_timeline.json?oauth_consumer_key=OmTQVOKDomNbrHuuudS4Qo http://api.twitter.com/1/statuses/home_timeline.json?oauth_consumer_key=OmTQVOKDomNbrHuuudS4Qo auth_nonce=uQTDMWP-6tFdwTAbDwiHeyrP7NEZoauth_signature_method=HMAC-SHA1oauth_timestamp=1287053858 oauth_token=144717423-P3to4wvZPFsgrIQWBAZPjlEAm39tfEtaao7HQWA7oauth_version=1.0oauth_signature=wgRPZqaIJU%2BrkHOSAN99JreWLr4%3D Error response look like below. --- Header received header name:Date Value:Thu, 14 Oct 2010 10:57:39 GMT NN 2010-10-14 16:27:39.700 Header received header name:Server Value:hi NN 2010-10-14 16:27:39.700 Header received header name:Status Value:401 Unauthorized NN 2010-10-14 16:27:39.700 Header received header name:WWW-Authenticate Value:Basic realm=Twitter API NN 2010-10-14 16:27:39.700 Header received header
Re: [twitter-dev] Incorrect signature while getting home tweets
When using headers, you need to wrap each value in quotes. The authorization header should contain only oauth_* parameters, not any additional query parameters that may have been part of your request. Here's an example of the same request you're trying to make (with different keys, but the same basic request). Note the format of the authorization header. *Signature Base String* GEThttp%3A%2F%2Fapi.twitter.com %2F1%2Fstatuses%2Fhome_timeline.jsonoauth_consumer_key%3Dri8JxYK2ddwSV5xIUfNNvQ%26oauth_nonce%3DaZj92w9Wna0lSdL8RsGuNPi7YWyLPaVxTX5k1Xqo%26oauth_signature_method%3DHMAC-SHA1%26oauth_timestamp%3D1287412992%26oauth_token%3D819797-torCkTs0XK7H2Y2i1ee5iofqkMC4p7aayeEXRTmlw%26oauth_version%3D1.0%26page%3D1 *Authorization Header* OAuth oauth_nonce=aZj92w9Wna0lSdL8RsGuNPi7YWyLPaVxTX5k1Xqo, oauth_signature_method=HMAC-SHA1, oauth_timestamp=1287412992, oauth_consumer_key=ri8JxYK2ddwSV5xIUfNNvQ, oauth_token=819797-torCkTs0XK7H2Y2i1ee5iofqkMC4p7aayeEXRTmlw, oauth_signature=Cucyk%2FMx0saSsJA%2B79fe29HZu9Q%3D, oauth_version=1.0 *Executed URL* http://api.twitter.com/1/statuses/home_timeline.json?page=1 Taylor On Mon, Oct 18, 2010 at 6:04 AM, Georgooty varghese georgo...@gmail.comwrote: could you please help me .. I am waiting for your reply... On Mon, Oct 18, 2010 at 1:39 PM, Georgooty varghese georgo...@gmail.comwrote: Now I set to http header name is Authorization header value = oauth_consumer_key=**,oauth_nonce=b8qoVIxfQyEOOgu6vHjN215,oauth_signature_method=HMAC-SHA1, oauth_timestamp=1287389017,oauth_token=*,oauth_version=1.0,page=1 ,oauth_signature=cY%2F7W%2FuLWCidUD7KziKFwOcM9RI%3D http req url = http://api.twitter.com/1/statuses/home_timeline.json?page=1 But Its not working {error:Could not authenticate you.,request:/1/statuses/home_timeline.json?page=1} I have posted a tweet successfully in to twitter server using query string authentication. The followers/following url's working fine using query string auth params. B Home tweets and credential url was not working. Could u please help me .. I am waiting for your response. On Sat, Oct 16, 2010 at 4:08 PM, Tom van der Woerdt i...@tvdw.eu wrote: The syntax of that header is wrong. Please look at http://dev.twitter.com/pages/auth for the correct syntax. Tom On 10/16/10 9:23 AM, Georgooty varghese wrote: * Now I set to Http header value Header name = Authorization value = http://api.twitter.com/1/statuses/home_timeline.json?oauth_consumer_key=*oauth_nonce=QyRr PmridwwSG6oEsr4EIoauth_signature_method=HMAC-SHA1oauth_timestamp=1287212752oauth_token=***oauth_version=1.0oauth_signature=WMYyqUYpD4lIfe8f3v3u1o2r2uk%3D Now i got {error:Could not authenticate you.,request:/1/statuses/home_timeline.json} exception message. What can I do for resolve this exception. On Thu, Oct 14, 2010 at 7:30 PM, Taylor Singletary taylorsinglet...@twitter.com mailto:taylorsinglet...@twitter.com wrote: Without getting to deep into this, some advice: * Use HTTP header based authentication instead of attaching OAuth parameters to the query string. It makes it much more difficult to receive assistance from others when you use query-string based auth and increases the chances of an encoding error exponentially. * Avoid strange characters in an oauth_nonce. When possible, avoid the ~ character entirely -- depending on the language and libraries you are using, some are less spec compliant than others on characters like tilde * That you were able to negotiate oauth_tokens through xAuth is a good sign that your code does something right. POSTs are harder than GETs. There must be something simple wrong with your GET. Look very closely. Compare to the spec if necessary. Compare to other code that produces the correct results. Taylor On Thu, Oct 14, 2010 at 4:06 AM, Georgooty varghese georgo...@gmail.com mailto:georgo...@gmail.com wrote: Before I have implemented a twitter client in C# using xAuth authentication . At that application I have used xauth params for each url signin. Any problem I didn't get. That aclient application works fine. Now I have changed language C# to C. I have used liboauth library. I got oauth_token and oauth_token_secret values successfully. Then I have try to get home tweets. But i got incorrect signature. Base URL -- GEThttp%3A%2F%2Fapi.twitter.com http://2Fapi.twitter.com %2F1%2Fstatuses%2Fhome_timeline.jsonoauth_consumer_key%3DOm TQVOKDomNbrHuuudS4Q%26oauth_nonce%3DuQTDMWP-6tFdwTAbDwiHeyrP7NEZ%26oauth_signature_method%3DHMAC-SH A1%26oauth_timestamp%3D1287053858%26oauth_token%3D144717423-P3to4wvZPFsgrIQWBAZPjlEAm39tfEtaao7HQWA7%26oauth_version%3D1.0 Signature -
Re: [twitter-dev] Incorrect signature while getting home tweets
Thank u twitter. Could you specify what is header name? On Mon, Oct 18, 2010 at 8:15 PM, Taylor Singletary taylorsinglet...@twitter.com wrote: When using headers, you need to wrap each value in quotes. The authorization header should contain only oauth_* parameters, not any additional query parameters that may have been part of your request. Here's an example of the same request you're trying to make (with different keys, but the same basic request). Note the format of the authorization header. *Signature Base String* GEThttp%3A%2F%2Fapi.twitter.com %2F1%2Fstatuses%2Fhome_timeline.jsonoauth_consumer_key%3Dri8JxYK2ddwSV5xIUfNNvQ%26oauth_nonce%3DaZj92w9Wna0lSdL8RsGuNPi7YWyLPaVxTX5k1Xqo%26oauth_signature_method%3DHMAC-SHA1%26oauth_timestamp%3D1287412992%26oauth_token%3D819797-torCkTs0XK7H2Y2i1ee5iofqkMC4p7aayeEXRTmlw%26oauth_version%3D1.0%26page%3D1 *Authorization Header* OAuth oauth_nonce=aZj92w9Wna0lSdL8RsGuNPi7YWyLPaVxTX5k1Xqo, oauth_signature_method=HMAC-SHA1, oauth_timestamp=1287412992, oauth_consumer_key=ri8JxYK2ddwSV5xIUfNNvQ, oauth_token=819797-torCkTs0XK7H2Y2i1ee5iofqkMC4p7aayeEXRTmlw, oauth_signature=Cucyk%2FMx0saSsJA%2B79fe29HZu9Q%3D, oauth_version=1.0 *Executed URL* http://api.twitter.com/1/statuses/home_timeline.json?page=1 Taylor On Mon, Oct 18, 2010 at 6:04 AM, Georgooty varghese georgo...@gmail.comwrote: could you please help me .. I am waiting for your reply... On Mon, Oct 18, 2010 at 1:39 PM, Georgooty varghese georgo...@gmail.comwrote: Now I set to http header name is Authorization header value = oauth_consumer_key=**,oauth_nonce=b8qoVIxfQyEOOgu6vHjN215,oauth_signature_method=HMAC-SHA1, oauth_timestamp=1287389017,oauth_token=*,oauth_version=1.0,page=1 ,oauth_signature=cY%2F7W%2FuLWCidUD7KziKFwOcM9RI%3D http req url = http://api.twitter.com/1/statuses/home_timeline.json?page=1 But Its not working {error:Could not authenticate you.,request:/1/statuses/home_timeline.json?page=1} I have posted a tweet successfully in to twitter server using query string authentication. The followers/following url's working fine using query string auth params. B Home tweets and credential url was not working. Could u please help me .. I am waiting for your response. On Sat, Oct 16, 2010 at 4:08 PM, Tom van der Woerdt i...@tvdw.euwrote: The syntax of that header is wrong. Please look at http://dev.twitter.com/pages/auth for the correct syntax. Tom On 10/16/10 9:23 AM, Georgooty varghese wrote: * Now I set to Http header value Header name = Authorization value = http://api.twitter.com/1/statuses/home_timeline.json?oauth_consumer_key=*oauth_nonce=QyRr PmridwwSG6oEsr4EIoauth_signature_method=HMAC-SHA1oauth_timestamp=1287212752oauth_token=***oauth_version=1.0oauth_signature=WMYyqUYpD4lIfe8f3v3u1o2r2uk%3D Now i got {error:Could not authenticate you.,request:/1/statuses/home_timeline.json} exception message. What can I do for resolve this exception. On Thu, Oct 14, 2010 at 7:30 PM, Taylor Singletary taylorsinglet...@twitter.com mailto:taylorsinglet...@twitter.com wrote: Without getting to deep into this, some advice: * Use HTTP header based authentication instead of attaching OAuth parameters to the query string. It makes it much more difficult to receive assistance from others when you use query-string based auth and increases the chances of an encoding error exponentially. * Avoid strange characters in an oauth_nonce. When possible, avoid the ~ character entirely -- depending on the language and libraries you are using, some are less spec compliant than others on characters like tilde * That you were able to negotiate oauth_tokens through xAuth is a good sign that your code does something right. POSTs are harder than GETs. There must be something simple wrong with your GET. Look very closely. Compare to the spec if necessary. Compare to other code that produces the correct results. Taylor On Thu, Oct 14, 2010 at 4:06 AM, Georgooty varghese georgo...@gmail.com mailto:georgo...@gmail.com wrote: Before I have implemented a twitter client in C# using xAuth authentication . At that application I have used xauth params for each url signin. Any problem I didn't get. That aclient application works fine. Now I have changed language C# to C. I have used liboauth library. I got oauth_token and oauth_token_secret values successfully. Then I have try to get home tweets. But i got incorrect signature. Base URL -- GEThttp%3A%2F%2Fapi.twitter.com http://2Fapi.twitter.com %2F1%2Fstatuses%2Fhome_timeline.jsonoauth_consumer_key%3DOm TQVOKDomNbrHuuudS4Q%26oauth_nonce%3DuQTDMWP-6tFdwTAbDwiHeyrP7NEZ%26oauth_signature_method%3DHMAC-SH
Re: [twitter-dev] Incorrect signature while getting home tweets
Any body please help me? On Fri, Oct 15, 2010 at 11:00 AM, Georgooty varghese georgo...@gmail.comwrote: * Now I have removed oauth parameters in query string and added it to HTTP header. * Removed ~ char from auth nonce (reserved chars) Now i got another exception Could not authenticate you Could u please help me.. On Thu, Oct 14, 2010 at 7:30 PM, Taylor Singletary taylorsinglet...@twitter.com wrote: Without getting to deep into this, some advice: * Use HTTP header based authentication instead of attaching OAuth parameters to the query string. It makes it much more difficult to receive assistance from others when you use query-string based auth and increases the chances of an encoding error exponentially. * Avoid strange characters in an oauth_nonce. When possible, avoid the ~ character entirely -- depending on the language and libraries you are using, some are less spec compliant than others on characters like tilde * That you were able to negotiate oauth_tokens through xAuth is a good sign that your code does something right. POSTs are harder than GETs. There must be something simple wrong with your GET. Look very closely. Compare to the spec if necessary. Compare to other code that produces the correct results. Taylor On Thu, Oct 14, 2010 at 4:06 AM, Georgooty varghese georgo...@gmail.comwrote: Before I have implemented a twitter client in C# using xAuth authentication . At that application I have used xauth params for each url signin. Any problem I didn't get. That aclient application works fine. Now I have changed language C# to C. I have used liboauth library. I got oauth_token and oauth_token_secret values successfully. Then I have try to get home tweets. But i got incorrect signature. Base URL -- GEThttp%3A%2F%2Fapi.twitter.com %2F1%2Fstatuses%2Fhome_timeline.jsonoauth_consumer_key%3DOm TQVOKDomNbrHuuudS4Q%26oauth_nonce%3DuQTDMWP-6tFdwTAbDwiHeyrP7NEZ%26oauth_signature_method%3DHMAC-SH A1%26oauth_timestamp%3D1287053858%26oauth_token%3D144717423-P3to4wvZPFsgrIQWBAZPjlEAm39tfEtaao7HQWA7%26oauth_version%3D1.0 Signature - FcKenujneOtQklp6HZYDkRc7BYzelW9Fsadj324REdirvhD970MRu oQxPM2uOfzocpkRT3m0LKn0HPDcKkM URL -- http://api.twitter.com/1/statuses/home_timeline.json?oauth_consumer_key=OmTQVOKDomNbrHuuudS4Qo auth_nonce=uQTDMWP-6tFdwTAbDwiHeyrP7NEZoauth_signature_method=HMAC-SHA1oauth_timestamp=1287053858 oauth_token=144717423-P3to4wvZPFsgrIQWBAZPjlEAm39tfEtaao7HQWA7oauth_version=1.0oauth_signature=wgRPZqaIJU%2BrkHOSAN99JreWLr4%3D Error response look like below. --- Header received header name:Date Value:Thu, 14 Oct 2010 10:57:39 GMT NN 2010-10-14 16:27:39.700 Header received header name:Server Value:hi NN 2010-10-14 16:27:39.700 Header received header name:Status Value:401 Unauthorized NN 2010-10-14 16:27:39.700 Header received header name:WWW-Authenticate Value:Basic realm=Twitter API NN 2010-10-14 16:27:39.700 Header received header name:Content-Type Value:application/json; charset=utf-8 NN 2010-10-14 16:27:39.700 Header received header name:Content-Length Value:350 NN 2010-10-14 16:27:39.700 Header received header name:Cache-Control Value:no-cache, max-age=300 NN 2010-10-14 16:27:39.700 Header received header name:Set-Cookie Value:k=121.241.181.70.1287053859204701; path=/; expires=Thu, 21-Oct-10 10:57:39 GMT; domain=. twitter.com NN 2010-10-14 16:27:39.700 Header received header name:Set-Cookie Value:guest_id=128705385920759845; path=/; expires=Sat, 13 Nov 2010 10:57:39 GMT NN 2010-10-14 16:27:39.700 Header received header name:Set-Cookie Value:_twitter_sess=BAh7CDoPY3JlYXRlZF9hdGwrCI9ZY6orAToHaWQiJWNhNWJkMWFkNWNkZDQ0%250ANzkzZTUxZTdmMD AxY2YwMDNhIgpmbGFzaElDOidBY3Rpb25Db250cm9sbGVy%250AOjpGbGFzaDo6Rmxhc2hIYXNoewAGOgpAdXNlZHsA--39a08a fc637e1b3666e4066c100f477a9bfbd5b4; domain=. twitter.com; path=/ NN 2010-10-14 16:27:39.700 Header received header name:Expires Value:Thu, 14 Oct 2010 11:02:39 GMT NN 2010-10-14 16:27:39.700 Header received header name:Vary Value:Accept-Encoding NN 2010-10-14 16:27:39.700 Header received header name:Connection Value:close NN 2010-10-14 16:27:39.700 Data:{error:Incorrect signature,request:/1/statuses/home_timeline.json?oauth_consumer_key=OmTQVOKDomNbrHuuudS4Qoauth _nonce=uQTDMWP-6tFdwTAbDwiHeyrP7NEZoauth_signature_method=HMAC-SHA1oauth_timestamp=1287053858oau th_token=144717423-P3to4wvZPFsgrIQWBAZPjlEAm39tfEtaao7HQWA7oauth_version=1.0oauth_signature=wgRPZ qaIJU%252BrkHOSAN99JreWLr4%253D} .Now I am strucked. Any body please help me. Regards, George On Thu, Oct 14, 2010 at 12:11 PM, Georgooty varghese georgo...@gmail.com wrote: Base string look like GEThttp%3A%2F%2Fapi.twitter.com
Re: [twitter-dev] Incorrect signature while getting home tweets
* Now I set to Http header value Header name = Authorization value = http://api.twitter.com/1/statuses/home_timeline.json?oauth_consumer_key= *oauth_nonce=QyRr PmridwwSG6oEsr4EIoauth_signature_method=HMAC-SHA1oauth_timestamp=1287212752oauth_token=***oauth_version=1.0oauth_signature=WMYyqUYpD4lIfe8f3v3u1o2r2uk%3D Now i got {error:Could not authenticate you.,request:/1/statuses/home_timeline.json} exception message. What can I do for resolve this exception. On Thu, Oct 14, 2010 at 7:30 PM, Taylor Singletary taylorsinglet...@twitter.com wrote: Without getting to deep into this, some advice: * Use HTTP header based authentication instead of attaching OAuth parameters to the query string. It makes it much more difficult to receive assistance from others when you use query-string based auth and increases the chances of an encoding error exponentially. * Avoid strange characters in an oauth_nonce. When possible, avoid the ~ character entirely -- depending on the language and libraries you are using, some are less spec compliant than others on characters like tilde * That you were able to negotiate oauth_tokens through xAuth is a good sign that your code does something right. POSTs are harder than GETs. There must be something simple wrong with your GET. Look very closely. Compare to the spec if necessary. Compare to other code that produces the correct results. Taylor On Thu, Oct 14, 2010 at 4:06 AM, Georgooty varghese georgo...@gmail.comwrote: Before I have implemented a twitter client in C# using xAuth authentication . At that application I have used xauth params for each url signin. Any problem I didn't get. That aclient application works fine. Now I have changed language C# to C. I have used liboauth library. I got oauth_token and oauth_token_secret values successfully. Then I have try to get home tweets. But i got incorrect signature. Base URL -- GEThttp%3A%2F%2Fapi.twitter.com %2F1%2Fstatuses%2Fhome_timeline.jsonoauth_consumer_key%3DOm TQVOKDomNbrHuuudS4Q%26oauth_nonce%3DuQTDMWP-6tFdwTAbDwiHeyrP7NEZ%26oauth_signature_method%3DHMAC-SH A1%26oauth_timestamp%3D1287053858%26oauth_token%3D144717423-P3to4wvZPFsgrIQWBAZPjlEAm39tfEtaao7HQWA7%26oauth_version%3D1.0 Signature - FcKenujneOtQklp6HZYDkRc7BYzelW9Fsadj324REdirvhD970MRu oQxPM2uOfzocpkRT3m0LKn0HPDcKkM URL -- http://api.twitter.com/1/statuses/home_timeline.json?oauth_consumer_key=OmTQVOKDomNbrHuuudS4Qo auth_nonce=uQTDMWP-6tFdwTAbDwiHeyrP7NEZoauth_signature_method=HMAC-SHA1oauth_timestamp=1287053858 oauth_token=144717423-P3to4wvZPFsgrIQWBAZPjlEAm39tfEtaao7HQWA7oauth_version=1.0oauth_signature=wgRPZqaIJU%2BrkHOSAN99JreWLr4%3D Error response look like below. --- Header received header name:Date Value:Thu, 14 Oct 2010 10:57:39 GMT NN 2010-10-14 16:27:39.700 Header received header name:Server Value:hi NN 2010-10-14 16:27:39.700 Header received header name:Status Value:401 Unauthorized NN 2010-10-14 16:27:39.700 Header received header name:WWW-Authenticate Value:Basic realm=Twitter API NN 2010-10-14 16:27:39.700 Header received header name:Content-Type Value:application/json; charset=utf-8 NN 2010-10-14 16:27:39.700 Header received header name:Content-Length Value:350 NN 2010-10-14 16:27:39.700 Header received header name:Cache-Control Value:no-cache, max-age=300 NN 2010-10-14 16:27:39.700 Header received header name:Set-Cookie Value:k=121.241.181.70.1287053859204701; path=/; expires=Thu, 21-Oct-10 10:57:39 GMT; domain=. twitter.com NN 2010-10-14 16:27:39.700 Header received header name:Set-Cookie Value:guest_id=128705385920759845; path=/; expires=Sat, 13 Nov 2010 10:57:39 GMT NN 2010-10-14 16:27:39.700 Header received header name:Set-Cookie Value:_twitter_sess=BAh7CDoPY3JlYXRlZF9hdGwrCI9ZY6orAToHaWQiJWNhNWJkMWFkNWNkZDQ0%250ANzkzZTUxZTdmMD AxY2YwMDNhIgpmbGFzaElDOidBY3Rpb25Db250cm9sbGVy%250AOjpGbGFzaDo6Rmxhc2hIYXNoewAGOgpAdXNlZHsA--39a08a fc637e1b3666e4066c100f477a9bfbd5b4; domain=. twitter.com; path=/ NN 2010-10-14 16:27:39.700 Header received header name:Expires Value:Thu, 14 Oct 2010 11:02:39 GMT NN 2010-10-14 16:27:39.700 Header received header name:Vary Value:Accept-Encoding NN 2010-10-14 16:27:39.700 Header received header name:Connection Value:close NN 2010-10-14 16:27:39.700 Data:{error:Incorrect signature,request:/1/statuses/home_timeline.json?oauth_consumer_key=OmTQVOKDomNbrHuuudS4Qoauth _nonce=uQTDMWP-6tFdwTAbDwiHeyrP7NEZoauth_signature_method=HMAC-SHA1oauth_timestamp=1287053858oau th_token=144717423-P3to4wvZPFsgrIQWBAZPjlEAm39tfEtaao7HQWA7oauth_version=1.0oauth_signature=wgRPZ qaIJU%252BrkHOSAN99JreWLr4%253D} .Now I am strucked. Any body please help me. Regards, George On Thu, Oct 14, 2010 at 12:11 PM, Georgooty
Re: [twitter-dev] Incorrect signature while getting home tweets
The syntax of that header is wrong. Please look at http://dev.twitter.com/pages/auth for the correct syntax. Tom On 10/16/10 9:23 AM, Georgooty varghese wrote: * Now I set to Http header value Header name = Authorization value = http://api.twitter.com/1/statuses/home_timeline.json?oauth_consumer_key=*oauth_nonce=QyRr PmridwwSG6oEsr4EIoauth_signature_method=HMAC-SHA1oauth_timestamp=1287212752oauth_token=***oauth_version=1.0oauth_signature=WMYyqUYpD4lIfe8f3v3u1o2r2uk%3D Now i got {error:Could not authenticate you.,request:/1/statuses/home_timeline.json} exception message. What can I do for resolve this exception. On Thu, Oct 14, 2010 at 7:30 PM, Taylor Singletary taylorsinglet...@twitter.com mailto:taylorsinglet...@twitter.com wrote: Without getting to deep into this, some advice: * Use HTTP header based authentication instead of attaching OAuth parameters to the query string. It makes it much more difficult to receive assistance from others when you use query-string based auth and increases the chances of an encoding error exponentially. * Avoid strange characters in an oauth_nonce. When possible, avoid the ~ character entirely -- depending on the language and libraries you are using, some are less spec compliant than others on characters like tilde * That you were able to negotiate oauth_tokens through xAuth is a good sign that your code does something right. POSTs are harder than GETs. There must be something simple wrong with your GET. Look very closely. Compare to the spec if necessary. Compare to other code that produces the correct results. Taylor On Thu, Oct 14, 2010 at 4:06 AM, Georgooty varghese georgo...@gmail.com mailto:georgo...@gmail.com wrote: Before I have implemented a twitter client in C# using xAuth authentication . At that application I have used xauth params for each url signin. Any problem I didn't get. That aclient application works fine. Now I have changed language C# to C. I have used liboauth library. I got oauth_token and oauth_token_secret values successfully. Then I have try to get home tweets. But i got incorrect signature. Base URL -- GEThttp%3A%2F%2Fapi.twitter.com http://2Fapi.twitter.com%2F1%2Fstatuses%2Fhome_timeline.jsonoauth_consumer_key%3DOm TQVOKDomNbrHuuudS4Q%26oauth_nonce%3DuQTDMWP-6tFdwTAbDwiHeyrP7NEZ%26oauth_signature_method%3DHMAC-SH A1%26oauth_timestamp%3D1287053858%26oauth_token%3D144717423-P3to4wvZPFsgrIQWBAZPjlEAm39tfEtaao7HQWA7%26oauth_version%3D1.0 Signature - FcKenujneOtQklp6HZYDkRc7BYzelW9Fsadj324REdirvhD970MRu oQxPM2uOfzocpkRT3m0LKn0HPDcKkM URL -- http://api.twitter.com/1/statuses/home_timeline.json?oauth_consumer_key=OmTQVOKDomNbrHuuudS4Qo http://api.twitter.com/1/statuses/home_timeline.json?oauth_consumer_key=OmTQVOKDomNbrHuuudS4Qo auth_nonce=uQTDMWP-6tFdwTAbDwiHeyrP7NEZoauth_signature_method=HMAC-SHA1oauth_timestamp=1287053858 oauth_token=144717423-P3to4wvZPFsgrIQWBAZPjlEAm39tfEtaao7HQWA7oauth_version=1.0oauth_signature=wgRPZqaIJU%2BrkHOSAN99JreWLr4%3D Error response look like below. --- Header received header name:Date Value:Thu, 14 Oct 2010 10:57:39 GMT NN 2010-10-14 16:27:39.700 Header received header name:Server Value:hi NN 2010-10-14 16:27:39.700 Header received header name:Status Value:401 Unauthorized NN 2010-10-14 16:27:39.700 Header received header name:WWW-Authenticate Value:Basic realm=Twitter API NN 2010-10-14 16:27:39.700 Header received header name:Content-Type Value:application/json; charset=utf-8 NN 2010-10-14 16:27:39.700 Header received header name:Content-Length Value:350 NN 2010-10-14 16:27:39.700 Header received header name:Cache-Control Value:no-cache, max-age=300 NN 2010-10-14 16:27:39.700 Header received header name:Set-Cookie Value:k=121.241.181.70.1287053859204701; path=/; expires=Thu, 21-Oct-10 10:57:39 GMT; domain=.twitter.com http://twitter.com NN 2010-10-14 16:27:39.700 Header received header name:Set-Cookie Value:guest_id=128705385920759845; path=/; expires=Sat, 13 Nov 2010 10:57:39 GMT NN 2010-10-14 16:27:39.700 Header
Re: [twitter-dev] Incorrect signature while getting home tweets
Thanks for quick reply. Now i have removed xAuth stuff in GET parameter. Now uri is look like http://api.twitter.com/1/statuses/home_timeline.json?oauth_consumer_key=; oauth_nonce=uL0qgrUAvpXplm1jw8GKScISb.ROJ8oauth_signature_method=HMAC-SHA1oauth_timestamp=1287035395oauth_token=***oauth_version=1.0oauth_signature=fplh8jf6dACb%2FPfUBEGxUmhE5ZE%3D But unfortunatly it doesn't work.. I got Incorrect signature. Could you please help me.. I am waiting for you response. On Thu, Oct 14, 2010 at 11:17 AM, Tom van der Woerdt i...@tvdw.eu wrote: Don't use xAuth, use OAuth. Leave the x_auth_ stuff and use your oauth_token and oauth_token_secret. Oh, and look at what xAuth actually is. It's no replacement for OAuth. Tom On 10/14/10 5:22 AM, Georgooty varghese wrote: Dear Twitter, I have implemented a twitter client application in C using xAuth authentication. I got auth token and token secret. Then I wont be able to get home tweets. Exception is Incorrect signature. URL is http://api.twitter.com/1/statuses/home_timeline.json? oauth_consumer_key=oauth_nonce= HswRm6~rUgKTz1ZjkIOoauth_signature_method=HMAC-SHA1 oauth_timestamp=1287026003oauth_token=**oauth_version=1. 0x_auth_mode=client_authx_auth_password=***x_a uth_username=oauth_signature=5gqkckIqP56Z5e he02tlt6qMu%2BU%3D When this url is copy into internet explorer.. I get json file. But C - coding i didnt get.. Could u please help me?/ I am waiting for your response. Regards, George -- 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 -- 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
Re: [twitter-dev] Incorrect signature while getting home tweets
Could you give us your Base String? Tom On Oct 14, 2010, at 8:00 AM, Georgooty varghese georgo...@gmail.com wrote: Thanks for quick reply. Now i have removed xAuth stuff in GET parameter. Now uri is look like http://api.twitter.com/1/statuses/home_timeline.json?oauth_consumer_key=; oauth_nonce=uL0qgrUAvpXplm1jw8GKScISb.ROJ8oauth_signature_method=HMAC-SHA1oauth_timestamp=1287035395oauth_token=***oauth_version=1.0oauth_signature=fplh8jf6dACb%2FPfUBEGxUmhE5ZE%3D But unfortunatly it doesn't work.. I got Incorrect signature. Could you please help me.. I am waiting for you response. On Thu, Oct 14, 2010 at 11:17 AM, Tom van der Woerdt i...@tvdw.eu wrote: Don't use xAuth, use OAuth. Leave the x_auth_ stuff and use your oauth_token and oauth_token_secret. Oh, and look at what xAuth actually is. It's no replacement for OAuth. Tom On 10/14/10 5:22 AM, Georgooty varghese wrote: Dear Twitter, I have implemented a twitter client application in C using xAuth authentication. I got auth token and token secret. Then I wont be able to get home tweets. Exception is Incorrect signature. URL is http://api.twitter.com/1/statuses/home_timeline.json? oauth_consumer_key=oauth_nonce= HswRm6~rUgKTz1ZjkIOoauth_signature_method=HMAC-SHA1 oauth_timestamp=1287026003oauth_token=**oauth_version=1. 0x_auth_mode=client_authx_auth_password=***x_a uth_username=oauth_signature=5gqkckIqP56Z5e he02tlt6qMu%2BU%3D When this url is copy into internet explorer.. I get json file. But C - coding i didnt get.. Could u please help me?/ I am waiting for your response. Regards, George -- 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 -- 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
Re: [twitter-dev] Incorrect signature while getting home tweets
Base string look like GEThttp%3A%2F%2Fapi.twitter.com %2F1%2Fstatuses%2Fhome_timeline.jsonoauth_consumer_key%3DOmTQVOKDomNbrHuuudS 4Q%26oauth_nonce%3DrkocKD.~GoWoUPUGvtdxPdNw4%26oauth_signature_method%3DHMAC-SHA1%26oauth_timestamp%3D1287038316%26oauth_token%3D144717423-hrxCod9d6GMVnuLcYPHucluTxoDO68wFpGzkfn3h%26oauth_version%3D1.0 signature FcKenujneOtQklp6HZYDkRc7BYzelW9Fsadj324REpVccpaABnoClLwzrPQSglNdWkvL8sr3Z9xwvGXDfg Please help me... On Thu, Oct 14, 2010 at 11:54 AM, Tom van der Woerdt i...@tvdw.eu wrote: Could you give us your Base String? Tom On Oct 14, 2010, at 8:00 AM, Georgooty varghese georgo...@gmail.com wrote: Thanks for quick reply. Now i have removed xAuth stuff in GET parameter. Now uri is look like http://api.twitter.com/1/statuses/home_timeline.json?oauth_consumer_key=; http://api.twitter.com/1/statuses/home_timeline.json?oauth_consumer_key=; oauth_nonce=uL0qgrUAvpXplm1jw8GKScISb.ROJ8oauth_signature_method=HMAC-SHA1oauth_timestamp=1287035395oauth_token=***oauth_version=1.0oauth_signature=fplh8jf6dACb%2FPfUBEGxUmhE5ZE%3D But unfortunatly it doesn't work.. I got Incorrect signature. Could you please help me.. I am waiting for you response. On Thu, Oct 14, 2010 at 11:17 AM, Tom van der Woerdt i...@tvdw.eu i...@tvdw.eu wrote: Don't use xAuth, use OAuth. Leave the x_auth_ stuff and use your oauth_token and oauth_token_secret. Oh, and look at what xAuth actually is. It's no replacement for OAuth. Tom On 10/14/10 5:22 AM, Georgooty varghese wrote: Dear Twitter, I have implemented a twitter client application in C using xAuth authentication. I got auth token and token secret. Then I wont be able to get home tweets. Exception is Incorrect signature. URL is http://api.twitter.com/1/statuses/home_timeline.json http://api.twitter.com/1/statuses/home_timeline.json? oauth_consumer_key=oauth_nonce= HswRm6~rUgKTz1ZjkIOoauth_signature_method=HMAC-SHA1 oauth_timestamp=1287026003oauth_token=**oauth_version=1. 0x_auth_mode=client_authx_auth_password=***x_a uth_username=oauth_signature=5gqkckIqP56Z5e he02tlt6qMu%2BU%3D When this url is copy into internet explorer.. I get json file. But C - coding i didnt get.. Could u please help me?/ I am waiting for your response. Regards, George -- Twitter developer documentation and resources: http://dev.twitter.com/dochttp://dev.twitter.com/doc API updates via Twitter: http://twitter.com/twitterapi http://twitter.com/twitterapi Issues/Enhancements Tracker: http://code.google.com/p/twitter-api/issues/list http://code.google.com/p/twitter-api/issues/list Change your membership to this group: http://groups.google.com/group/twitter-development-talk http://groups.google.com/group/twitter-development-talk -- Twitter developer documentation and resources: http://dev.twitter.com/dochttp://dev.twitter.com/doc API updates via Twitter: http://twitter.com/twitterapi http://twitter.com/twitterapi Issues/Enhancements Tracker: http://code.google.com/p/twitter-api/issues/list http://code.google.com/p/twitter-api/issues/list Change your membership to this group: http://groups.google.com/group/twitter-development-talk http://groups.google.com/group/twitter-development-talk -- Twitter developer documentation and resources: http://dev.twitter.com/dochttp://dev.twitter.com/doc API updates via Twitter: http://twitter.com/twitterapi http://twitter.com/twitterapi Issues/Enhancements Tracker: http://code.google.com/p/twitter-api/issues/list http://code.google.com/p/twitter-api/issues/list Change your membership to this group: http://groups.google.com/group/twitter-development-talk 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 -- 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
Re: [twitter-dev] Incorrect signature while getting home tweets
Without getting to deep into this, some advice: * Use HTTP header based authentication instead of attaching OAuth parameters to the query string. It makes it much more difficult to receive assistance from others when you use query-string based auth and increases the chances of an encoding error exponentially. * Avoid strange characters in an oauth_nonce. When possible, avoid the ~ character entirely -- depending on the language and libraries you are using, some are less spec compliant than others on characters like tilde * That you were able to negotiate oauth_tokens through xAuth is a good sign that your code does something right. POSTs are harder than GETs. There must be something simple wrong with your GET. Look very closely. Compare to the spec if necessary. Compare to other code that produces the correct results. Taylor On Thu, Oct 14, 2010 at 4:06 AM, Georgooty varghese georgo...@gmail.comwrote: Before I have implemented a twitter client in C# using xAuth authentication . At that application I have used xauth params for each url signin. Any problem I didn't get. That aclient application works fine. Now I have changed language C# to C. I have used liboauth library. I got oauth_token and oauth_token_secret values successfully. Then I have try to get home tweets. But i got incorrect signature. Base URL -- GEThttp%3A%2F%2Fapi.twitter.com %2F1%2Fstatuses%2Fhome_timeline.jsonoauth_consumer_key%3DOm TQVOKDomNbrHuuudS4Q%26oauth_nonce%3DuQTDMWP-6tFdwTAbDwiHeyrP7NEZ%26oauth_signature_method%3DHMAC-SH A1%26oauth_timestamp%3D1287053858%26oauth_token%3D144717423-P3to4wvZPFsgrIQWBAZPjlEAm39tfEtaao7HQWA7%26oauth_version%3D1.0 Signature - FcKenujneOtQklp6HZYDkRc7BYzelW9Fsadj324REdirvhD970MRu oQxPM2uOfzocpkRT3m0LKn0HPDcKkM URL -- http://api.twitter.com/1/statuses/home_timeline.json?oauth_consumer_key=OmTQVOKDomNbrHuuudS4Qo auth_nonce=uQTDMWP-6tFdwTAbDwiHeyrP7NEZoauth_signature_method=HMAC-SHA1oauth_timestamp=1287053858 oauth_token=144717423-P3to4wvZPFsgrIQWBAZPjlEAm39tfEtaao7HQWA7oauth_version=1.0oauth_signature=wgRPZqaIJU%2BrkHOSAN99JreWLr4%3D Error response look like below. --- Header received header name:Date Value:Thu, 14 Oct 2010 10:57:39 GMT NN 2010-10-14 16:27:39.700 Header received header name:Server Value:hi NN 2010-10-14 16:27:39.700 Header received header name:Status Value:401 Unauthorized NN 2010-10-14 16:27:39.700 Header received header name:WWW-Authenticate Value:Basic realm=Twitter API NN 2010-10-14 16:27:39.700 Header received header name:Content-Type Value:application/json; charset=utf-8 NN 2010-10-14 16:27:39.700 Header received header name:Content-Length Value:350 NN 2010-10-14 16:27:39.700 Header received header name:Cache-Control Value:no-cache, max-age=300 NN 2010-10-14 16:27:39.700 Header received header name:Set-Cookie Value:k=121.241.181.70.1287053859204701; path=/; expires=Thu, 21-Oct-10 10:57:39 GMT; domain=. twitter.com NN 2010-10-14 16:27:39.700 Header received header name:Set-Cookie Value:guest_id=128705385920759845; path=/; expires=Sat, 13 Nov 2010 10:57:39 GMT NN 2010-10-14 16:27:39.700 Header received header name:Set-Cookie Value:_twitter_sess=BAh7CDoPY3JlYXRlZF9hdGwrCI9ZY6orAToHaWQiJWNhNWJkMWFkNWNkZDQ0%250ANzkzZTUxZTdmMD AxY2YwMDNhIgpmbGFzaElDOidBY3Rpb25Db250cm9sbGVy%250AOjpGbGFzaDo6Rmxhc2hIYXNoewAGOgpAdXNlZHsA--39a08a fc637e1b3666e4066c100f477a9bfbd5b4; domain=. twitter.com; path=/ NN 2010-10-14 16:27:39.700 Header received header name:Expires Value:Thu, 14 Oct 2010 11:02:39 GMT NN 2010-10-14 16:27:39.700 Header received header name:Vary Value:Accept-Encoding NN 2010-10-14 16:27:39.700 Header received header name:Connection Value:close NN 2010-10-14 16:27:39.700 Data:{error:Incorrect signature,request:/1/statuses/home_timeline.json?oauth_consumer_key=OmTQVOKDomNbrHuuudS4Qoauth _nonce=uQTDMWP-6tFdwTAbDwiHeyrP7NEZoauth_signature_method=HMAC-SHA1oauth_timestamp=1287053858oau th_token=144717423-P3to4wvZPFsgrIQWBAZPjlEAm39tfEtaao7HQWA7oauth_version=1.0oauth_signature=wgRPZ qaIJU%252BrkHOSAN99JreWLr4%253D} .Now I am strucked. Any body please help me. Regards, George On Thu, Oct 14, 2010 at 12:11 PM, Georgooty varghese georgo...@gmail.com wrote: Base string look like GEThttp%3A%2F%2Fapi.twitter.com %2F1%2Fstatuses%2Fhome_timeline.jsonoauth_consumer_key%3DOmTQVOKDomNbrHuuudS 4Q%26oauth_nonce%3DrkocKD.~GoWoUPUGvtdxPdNw4%26oauth_signature_method%3DHMAC-SHA1%26oauth_timestamp%3D1287038316%26oauth_token%3D144717423-hrxCod9d6GMVnuLcYPHucluTxoDO68wFpGzkfn3h%26oauth_version%3D1.0 signature FcKenujneOtQklp6HZYDkRc7BYzelW9Fsadj324REpVccpaABnoClLwzrPQSglNdWkvL8sr3Z9xwvGXDfg Please help me... On Thu, Oct 14, 2010 at 11:54 AM, Tom van der Woerdt i...@tvdw.euwrote: Could
Re: [twitter-dev] Incorrect signature while getting home tweets
* Now I have removed oauth parameters in query string and added it to HTTP header. * Removed ~ char from auth nonce (reserved chars) Now i got another exception Could not authenticate you Could u please help me.. On Thu, Oct 14, 2010 at 7:30 PM, Taylor Singletary taylorsinglet...@twitter.com wrote: Without getting to deep into this, some advice: * Use HTTP header based authentication instead of attaching OAuth parameters to the query string. It makes it much more difficult to receive assistance from others when you use query-string based auth and increases the chances of an encoding error exponentially. * Avoid strange characters in an oauth_nonce. When possible, avoid the ~ character entirely -- depending on the language and libraries you are using, some are less spec compliant than others on characters like tilde * That you were able to negotiate oauth_tokens through xAuth is a good sign that your code does something right. POSTs are harder than GETs. There must be something simple wrong with your GET. Look very closely. Compare to the spec if necessary. Compare to other code that produces the correct results. Taylor On Thu, Oct 14, 2010 at 4:06 AM, Georgooty varghese georgo...@gmail.comwrote: Before I have implemented a twitter client in C# using xAuth authentication . At that application I have used xauth params for each url signin. Any problem I didn't get. That aclient application works fine. Now I have changed language C# to C. I have used liboauth library. I got oauth_token and oauth_token_secret values successfully. Then I have try to get home tweets. But i got incorrect signature. Base URL -- GEThttp%3A%2F%2Fapi.twitter.com %2F1%2Fstatuses%2Fhome_timeline.jsonoauth_consumer_key%3DOm TQVOKDomNbrHuuudS4Q%26oauth_nonce%3DuQTDMWP-6tFdwTAbDwiHeyrP7NEZ%26oauth_signature_method%3DHMAC-SH A1%26oauth_timestamp%3D1287053858%26oauth_token%3D144717423-P3to4wvZPFsgrIQWBAZPjlEAm39tfEtaao7HQWA7%26oauth_version%3D1.0 Signature - FcKenujneOtQklp6HZYDkRc7BYzelW9Fsadj324REdirvhD970MRu oQxPM2uOfzocpkRT3m0LKn0HPDcKkM URL -- http://api.twitter.com/1/statuses/home_timeline.json?oauth_consumer_key=OmTQVOKDomNbrHuuudS4Qo auth_nonce=uQTDMWP-6tFdwTAbDwiHeyrP7NEZoauth_signature_method=HMAC-SHA1oauth_timestamp=1287053858 oauth_token=144717423-P3to4wvZPFsgrIQWBAZPjlEAm39tfEtaao7HQWA7oauth_version=1.0oauth_signature=wgRPZqaIJU%2BrkHOSAN99JreWLr4%3D Error response look like below. --- Header received header name:Date Value:Thu, 14 Oct 2010 10:57:39 GMT NN 2010-10-14 16:27:39.700 Header received header name:Server Value:hi NN 2010-10-14 16:27:39.700 Header received header name:Status Value:401 Unauthorized NN 2010-10-14 16:27:39.700 Header received header name:WWW-Authenticate Value:Basic realm=Twitter API NN 2010-10-14 16:27:39.700 Header received header name:Content-Type Value:application/json; charset=utf-8 NN 2010-10-14 16:27:39.700 Header received header name:Content-Length Value:350 NN 2010-10-14 16:27:39.700 Header received header name:Cache-Control Value:no-cache, max-age=300 NN 2010-10-14 16:27:39.700 Header received header name:Set-Cookie Value:k=121.241.181.70.1287053859204701; path=/; expires=Thu, 21-Oct-10 10:57:39 GMT; domain=. twitter.com NN 2010-10-14 16:27:39.700 Header received header name:Set-Cookie Value:guest_id=128705385920759845; path=/; expires=Sat, 13 Nov 2010 10:57:39 GMT NN 2010-10-14 16:27:39.700 Header received header name:Set-Cookie Value:_twitter_sess=BAh7CDoPY3JlYXRlZF9hdGwrCI9ZY6orAToHaWQiJWNhNWJkMWFkNWNkZDQ0%250ANzkzZTUxZTdmMD AxY2YwMDNhIgpmbGFzaElDOidBY3Rpb25Db250cm9sbGVy%250AOjpGbGFzaDo6Rmxhc2hIYXNoewAGOgpAdXNlZHsA--39a08a fc637e1b3666e4066c100f477a9bfbd5b4; domain=. twitter.com; path=/ NN 2010-10-14 16:27:39.700 Header received header name:Expires Value:Thu, 14 Oct 2010 11:02:39 GMT NN 2010-10-14 16:27:39.700 Header received header name:Vary Value:Accept-Encoding NN 2010-10-14 16:27:39.700 Header received header name:Connection Value:close NN 2010-10-14 16:27:39.700 Data:{error:Incorrect signature,request:/1/statuses/home_timeline.json?oauth_consumer_key=OmTQVOKDomNbrHuuudS4Qoauth _nonce=uQTDMWP-6tFdwTAbDwiHeyrP7NEZoauth_signature_method=HMAC-SHA1oauth_timestamp=1287053858oau th_token=144717423-P3to4wvZPFsgrIQWBAZPjlEAm39tfEtaao7HQWA7oauth_version=1.0oauth_signature=wgRPZ qaIJU%252BrkHOSAN99JreWLr4%253D} .Now I am strucked. Any body please help me. Regards, George On Thu, Oct 14, 2010 at 12:11 PM, Georgooty varghese georgo...@gmail.com wrote: Base string look like GEThttp%3A%2F%2Fapi.twitter.com %2F1%2Fstatuses%2Fhome_timeline.jsonoauth_consumer_key%3DOmTQVOKDomNbrHuuudS
[twitter-dev] Incorrect signature while getting home tweets
Dear Twitter, I have implemented a twitter client application in C using xAuth authentication. I got auth token and token secret. Then I wont be able to get home tweets. Exception is Incorrect signature. URL is http://api.twitter.com/1/statuses/home_timeline.json? oauth_consumer_key=oauth_nonce= HswRm6~rUgKTz1ZjkIOoauth_signature_method=HMAC-SHA1 oauth_timestamp=1287026003oauth_token=**oauth_version=1. 0x_auth_mode=client_authx_auth_password=***x_a uth_username=oauth_signature=5gqkckIqP56Z5e he02tlt6qMu%2BU%3D When this url is copy into internet explorer.. I get json file. But C - coding i didnt get.. Could u please help me?/ I am waiting for your response. Regards, George -- 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
Re: [twitter-dev] Incorrect signature while getting home tweets
Don't use xAuth, use OAuth. Leave the x_auth_ stuff and use your oauth_token and oauth_token_secret. Oh, and look at what xAuth actually is. It's no replacement for OAuth. Tom On 10/14/10 5:22 AM, Georgooty varghese wrote: Dear Twitter, I have implemented a twitter client application in C using xAuth authentication. I got auth token and token secret. Then I wont be able to get home tweets. Exception is Incorrect signature. URL is http://api.twitter.com/1/statuses/home_timeline.json? oauth_consumer_key=oauth_nonce= HswRm6~rUgKTz1ZjkIOoauth_signature_method=HMAC-SHA1 oauth_timestamp=1287026003oauth_token=**oauth_version=1. 0x_auth_mode=client_authx_auth_password=***x_a uth_username=oauth_signature=5gqkckIqP56Z5e he02tlt6qMu%2BU%3D When this url is copy into internet explorer.. I get json file. But C - coding i didnt get.. Could u please help me?/ I am waiting for your response. Regards, George -- 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
[twitter-dev] Incorrect Signature
Working on just a simple update/status problem. I'm using the PEAR Services_Twitter object. I keep getting incorrect signature. I'm not sure if my headers are correct. Here is my header string: POST /1/statuses/update.json HTTP/1.1 User-Agent: HTTP_Request2/0.5.2 (http://pear.php.net/package/ http_request2) PHP/5.2.14 Authorization: OAuth realm=https://api.twitter.com/;, oauth_consumer_key=xxx, oauth_nonce=61ea77d3bc58d23f4cc073c7bb40, oauth_signature=%2BI99Du4e8ASC4%2BLNR1l3wRqoo6U%3D, oauth_signature_method=HMAC-SHA1, oauth_timestamp=1286753476, oauth_token=, oauth_version=1.0 Content-Type: application/x-www-form-urlencoded Host: api.twitter.com Accept-Encoding: gzip, deflate Content-Length: 21 Here is the body status=dingle%20berry If someone can put a finger on what I'm doing wrong it would be much appreciated. Kudos and Bullion Thanks -- 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-dev] Incorrect signature in perl without Net::Twitter when updating status
Hi I'm trying to change my status with perl, and without the Net::Twitter module. I'm using LWP useragent, and it works fine until the final call to update the status, where I get a incorrect signature. Here's my signature base string: my $signature_base_string = oauth_consumer_key= $hash{oauth_consumer_key}.oauth_nonce= $nonce.oauth_signature_method= $hash{oauth_signature_method}.oauth_timestamp=$epoch.oauth_token= $token_final.oauth_version=1.0.status=test; Then I escape the signature base string and concatenate it. $signature_base_string = URI::Escape::uri_escape_utf8($signature_base_string,'^\w.~-'); #$signature_base_string = URI::Escape::uri_escape_utf8($signature_base_string,'^\w.~-'); $signature_base_string = 'POST'.''.$url_encode.''. $signature_base_string; I espace the token and consumer secret $token_secret_final = URI::Escape::uri_escape_utf8($token_secret_final,'^\w.~-'); $hash{oauth_consumer_secret} = URI::Escape::uri_escape_utf8($hash{oauth_consumer_secret},'^\w.~-'); my $signature = $hash{oauth_consumer_secret}.''.$token_secret_final; I encrypt the token and consumer secret, then add the base string my $hmac = Digest::HMAC_SHA1-new($signature); $hmac-add($signature_base_string); my $signature = encode_base64($hmac-digest, ''); $signature = URI::Escape::uri_escape_utf8($signature,'^\w.~-'); I define the content type for header $ua-default_header('Content-Type' = application/x-www-form- urlencoded); And I post: my $response = $ua-post($url,[ 'oauth_consumer_key'='blalba', 'oauth_signature'=$signature, 'oauth_signature_method'='HMAC-SHA1', 'oauth_nonce'=$nonce, 'oauth_timestamp'=$epoch, 'oauth_token'=$token_final, 'oauth_version'=1.0, 'status'='test', ]); And here it bugs, I dont get it. It went fine for the request token and access token... If anyone could help me, I'm on it since 3 days now... Thanks! -- 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-dev] 'Incorrect signature' on status update with OAuth when verify credentials works
Hi, since a few days ago, my status update calls have stopped working. They actually worked sometimes which made it even more strange. Recently I have found a thread with some1 with the same problem I had, and he tested the status update without accents or special characters, and it worked. So I went on and tested, and it worked too. Why do I recieve the 'Incorrect signature' error every time I try to update a status with accents or special characters? What should I do? I'm using PHP with TwitterOAuth library and it worked fine for everything until now :/ Any help is appretiated -- 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-dev] Incorrect signature /1/statuses/update.json
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
Re: [twitter-dev] Incorrect signature /1/statuses/update.json
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
[twitter-dev] Incorrect Signature Retweeting
Hi There!, i'm Alberto, and I having troubles retweeting. I have xAuth, and token's (all set). Even i can tweet but i can't retweet. Here is my signature before the encoding thing. POSThttp%3A%2F%2Fapi.twitter.com%2F1%2Fstatuses%2Fretweet %2F21870373013.jsonoauth_consumer_key%3DcegASpTTOytVgFKyCYdP2Q %26oauth_nonce%3D8946d3e7060770a5d3f980b28bab5dfe %26oauth_signature_method%3DHMAC-SHA1%26oauth_timestamp %3D1282601201%26oauth_token%3D180124792- vCwLy0c7CI9LDTbioG4z1brL7ZEibfacoWC9U6rg%26oauth_version%3D1.0 After the encoding: Rg3pQX7wI3gCcxNgSHZp6b9OMp8%3D And my oauth Authorization header: OAuth oauth_nonce=8946d3e7060770a5d3f980b28bab5dfe, oauth_signature_method=HMAC-SHA1, oauth_timestamp=1282601201, oauth_consumer_key=cegASpTTOytVgFKyCYdP2Q, oauth_token=180124792- vCwLy0c7CI9LDTbioG4z1brL7ZEibfacoWC9U6rg, oauth_signature=Rg3pQX7wI3gCcxNgSHZp6b9OMp8%3D, oauth_version=1.0, id=21870373013 And after this, the error comes up. (Incorrect signature). I'm missing something?. I hope you guys can help me. Thanks!. Alberto Lagos T.
[twitter-dev] Incorrect signature with oAuth
Im developing a DLL in eVC++3.0 (native C++) that uses the Twitter oAuth to update a status and have searched the web and support websites for over a week but still cant figure the signature problem out. NOTE: I have deleted the app in this example so Its safe to give out the correct codes. This way I can get a better response from support. The DLL is a simple call to update a users status: status=h (to get this thing started) My DELETED App Info: ConsumerKey,x80ZNISjmQ0Lxufp0QVM6w ConsumerSecret,AHumtKUplfkqJVVy0VtbjoMROMU1SoVbCI8aIubu2Nc Token,63573892-Y5GT47cl6ixaRKTaK5TpDg9N9D6g5Wqy718pIydjK TokenSecret,6lRq2U4UoO3pv1Z0odU4lxhXvc3zlwJdOuyViQx44 Signature Base: POSThttp%3A%2F%2Fapi.twitter.com%2F1%2Fstatuses %2Fupdate.xmloauth_consumer_key%3Dx80ZNISjmQ0Lxufp0QVM6w%26oauth_nonce %3D4064976171056201%26oauth_signature_method%3DHMAC- SHA1%26oauth_timestamp%3D1279378609%26oauth_token%3D63573892- Y5GT47cl6ixaRKTaK5TpDg9N9D6g5Wqy718pIydjK%26oauth_version %3D1.0%26status%3Dh Signature Key to Sign with: AHumtKUplfkqJVVy0VtbjoMROMU1SoVbCI8aIubu2Nc6lRq2U4UoO3pv1Z0odU4lxhXvc3zlwJdOuyViQx44 http Header: = Authorization: OAuth oauth_nonce=4064976171056201, oauth_signature_method=HMAC-SHA1, oauth_timestamp=1279378609, oauth_consumer_key=x80ZNISjmQ0Lxufp0QVM6w, oauth_token=63573892- Y5GT47cl6ixaRKTaK5TpDg9N9D6g5Wqy718pIydjK, oauth_signature=ZztcjuTr1oxmVpQPAltfxiUEwEw%3D, oauth_version=1.0 Content-Type: application/x-www-form-urlencoded Host: api.twitter.com Content-Length: 10 Connection: Keep-Alive Http Footer = status%3Dh Server Response == ?xml version=1.0 encoding=UTF-8? hash request/1/statuses/update.xml/request errorIncorrect signature/error /hash I also tried the HTTPS in the signature base, and still the same error. NOTE: The DLL calls http://api.twitter.com/1/statuses/update.xml Vincent Collura CeBeans
[twitter-dev] Incorrect Signature
Hi everyone! I'm working on a Twitter application that uses Twitter API through Twitter4j and authenticates different accounts using OAuth. We are getting an incorrect signature error when trying to perform any post to twitter api (i.e. sending an update, following, etc). I'm using Twitter4j version 2.0.10. Although we are not using the latest version of Twitter4j, my code has been working pretty well for months until last week when I started to get these errors. Any help from you would be much appreciated. Thanks! Joel P.S.: Here goes the exception im getting Caused by: twitter4j.TwitterException: 401:Authentication credentials were missing or incorrect. ?xml version=1.0 encoding=UTF-8? hash request/statuses/update.xml/request errorIncorrect signature/error /hash at twitter4j.http.HttpClient.httpRequest(HttpClient.java:477) at twitter4j.http.HttpClient.post(HttpClient.java:401) at twitter4j.Twitter.updateStatus(Twitter.java:1232)
Re: [twitter-dev] Incorrect Signature
Hi Hoel, Signature validation errors occur for a variety of reasons. We have a few error conditions on the API right now where when under heavy load we might spuriously throw an invalid signature error, but these cases should be rare. To better assist you in your issues, you'll need to dig a bit deeper into the library you are using to extract the OAuth signature base string and your HTTP authorization headers. Also, your POST body on these update requests would be very useful as well as the complete executed URIs you're using. You mentioned you only recently started running into these issues. Does the failure occur for ALL write operations or only sporadically? Thanks, Taylor On Thu, Jun 24, 2010 at 12:59 PM, jc joelcuet...@gmail.com wrote: Hi everyone! I'm working on a Twitter application that uses Twitter API through Twitter4j and authenticates different accounts using OAuth. We are getting an incorrect signature error when trying to perform any post to twitter api (i.e. sending an update, following, etc). I'm using Twitter4j version 2.0.10. Although we are not using the latest version of Twitter4j, my code has been working pretty well for months until last week when I started to get these errors. Any help from you would be much appreciated. Thanks! Joel P.S.: Here goes the exception im getting Caused by: twitter4j.TwitterException: 401:Authentication credentials were missing or incorrect. ?xml version=1.0 encoding=UTF-8? hash request/statuses/update.xml/request errorIncorrect signature/error /hash at twitter4j.http.HttpClient.httpRequest(HttpClient.java:477) at twitter4j.http.HttpClient.post(HttpClient.java:401) at twitter4j.Twitter.updateStatus(Twitter.java:1232)
[twitter-dev] Incorrect Signature for oAuth
Hi All, I am having problems identifying what is wrong with converting my app to use oAuth. All my GET requests work fine but my POST requests all fail with an incorrect signature error. I am adding the oauth parameters to the authorisation header of my request. My authorisation header is build like below for GET requests (this works); OAuth oauth_timestamp=1234567890,oauth_nonce=xx,oauth_version=1.0,oauth_signature_method=HMAC- SHA1,oauth_consumer_key=xx,oauth_token=xx,oauth_signature=xx My POST requests (these don't work); OAuth oauth_timestamp=1234567890,oauth_nonce=xx,oauth_version=1.0,oauth_signature_method=HMAC- SHA1,oauth_consumer_key=xx,oauth_token=xx,oauth_signature=xx I get the below error returned... pre ?xml version=1.0 encoding=UTF-8? hash request/1/statuses/update.xml?source=xx/request errorIncorrect signature/error /hash Would anyone be able to provide any pointers here? Cheers, Rhys
[twitter-dev] Incorrect signature when calling update url /1/statuses/update.xml
Folks, I have been trying this and have already spent lot of time on this but what i don't understand is how is getting the access token working and post to update is not working when i am using the same signature generation method for both the requests. Here is my complete scenario. 1. fetch the request token 2. redirect the user to the authurize page 3. get the verifier from the new called back url 4. getting the access token by passing oauth_token and auth_verifier 5. create a new post request for update and sign the request with HMAC.sign(toSign, consumerSecret + '' + tokenSecret) Note: toSign is the request with the following headers : oauth_timestamp, oauth_signature_method, oauth_version, oauth_nonce, oauth_consumer_key 6. Send the request. Also if helpfull, i am using following values oauth_nonce=MD5.hexHash(getTimestampInSeconds()) oauth_signature_method=HMAC-SHA1 oauth_version=1.0 I have verified most of the things and looks good to me, also there is very less possibility of generating wrong signature as I have used the same signature to get the access token and was able to successfully receive it. Any pointers highly appreciated. Thanks, Rahul
Re: [twitter-dev] Incorrect signature when calling update url /1/statuses/update.xml
Hi Rahul, When you are POSTing to statuses/update.xml -- are you including the status that you are posting in your signature base string? As a URL-encoded parameter, it should be included in both your POST body and the signature base string (but not in the HTTP authorization header). Taylor Singletary Developer Advocate, Twitter http://twitter.com/episod On Thu, Apr 29, 2010 at 9:35 AM, Rahul rahul.jun...@gmail.com wrote: Folks, I have been trying this and have already spent lot of time on this but what i don't understand is how is getting the access token working and post to update is not working when i am using the same signature generation method for both the requests. Here is my complete scenario. 1. fetch the request token 2. redirect the user to the authurize page 3. get the verifier from the new called back url 4. getting the access token by passing oauth_token and auth_verifier 5. create a new post request for update and sign the request with HMAC.sign(toSign, consumerSecret + '' + tokenSecret) Note: toSign is the request with the following headers : oauth_timestamp, oauth_signature_method, oauth_version, oauth_nonce, oauth_consumer_key 6. Send the request. Also if helpfull, i am using following values oauth_nonce=MD5.hexHash(getTimestampInSeconds()) oauth_signature_method=HMAC-SHA1 oauth_version=1.0 I have verified most of the things and looks good to me, also there is very less possibility of generating wrong signature as I have used the same signature to get the access token and was able to successfully receive it. Any pointers highly appreciated. Thanks, Rahul
[twitter-dev] 'Incorrect signature' on status update with OAuth when verify credentials works
Almost there... Already googled this error and changed my request from http to https. Still getting same error... Any suggestions?
Re: [twitter-dev] 'Incorrect signature' on status update with OAuth when verify credentials works
I am just wondering why you can't keep all of your questions in the same thread? If somebody was having the same issues as you, they would have to look through 10+ of your threads. To try to answer the question, are you including the status parameter as part of the query string, which in turn, will be part of the signature? Ryan On Mon, Jan 25, 2010 at 10:17 PM, eco_bach bac...@gmail.com wrote: Almost there... Already googled this error and changed my request from http to https. Still getting same error... Any suggestions?
[twitter-dev] Incorrect signature returned for Lists API
I am experiencing Incorrect signature responses while requesting any Lists API XMLs. hash request/tweetvisor/lists/subscriptions.xml/request errorIncorrect signature/error /hash I tried various methods, with no success: POST, GET, HTTPS (default), HTTP. It only happens to Lists API calls, all other released API calls are working fine. If anyone know what's going on, please advise. Thanks, - @NeluLazar
[twitter-dev] Incorrect signature ERROR on /statuses/update.xml - Help Please....
Request URL: https://twitter.com/statuses/update.xml?STATUS=oauthtestingpleaseworkoauth_consumer_key=ConsumerKeyWasHereoauth_nonce=oauthNonceWasHereoauth_signature=rP%2FvX8Y2SAzFyMf3HsuRYFmBDe0%3Doauth_signature_method=HMAC-SHA1oauth_timestamp=1248841178oauth_token=oauthTokenWasHereoauth_version=1.0oauth_token_secret=oauthTokenSecretWasHERE ?xml version=1.0 encoding=UTF-8? hash request/statuses/update.xml?STATUS=oauthtestingpleaseworkamp;oauth_consumer_key=ConsumerKeyWasHereamp;oauth_nonce=oauthNonceWasHereamp;oauth_signature=rP%2FvX8Y2SAzFyMf3HsuRYFmBDe0%3Damp;oauth_signature_method=HMAC-SHA1amp;oauth_timestamp=1248841178amp;oauth_token=oauthTokenWasHereamp;oauth_version=1.0amp;oauth_token_secret=oauthTokenSecretWasHERE/request * errorIncorrect signature/error* /hash Any ideas on what I can do to get this request working? Thanks!