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
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