[twitter-dev] Error 401 only in Target (working fine in simulator)

2010-09-01 Thread Karthik
Hi ,

I am developing a Twitter application in MTK (Media tek ) platform.

I am using Oauth and and My application has the X-auth permission

I am first  using POST with required params and the am using below URL

https://api.twitter.com/oauth/access_token
   to get the access token in exchange with the username,
password.

I am able to get the access token and My application is working fine
in the simulator (I ma using the proxy server in simulator)

But in the Mobile (I amm not using proxy) , when I post
https://api.twitter.com/oauth/access_token
I am always getting 401 - Unauthorized (Failed to validate oauth
signature and token)

The below is my sample input string to get the signature (hmac-sha1)

POSThttp%3A%2F%2Fapi.twitter.com%2Foauth
%2Faccess_tokenoauth_consumer_key%3D4dsadsadsasdsd%26oauth_nonce
%3D1262304301%26oauth_signature_method%3DHMAC-SHA1%26oauth_timestamp
%3D1262304300%26oauth_version%3D1.0%26x_auth_mode%3Dclient_auth
%26x_auth_password%3Dtest1234%26x_auth_username%3Dnareshs
%2540google.com


Please someone help me to resolve this issue..





-- 
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?hl=en


Re: [twitter-dev] Error 401 only in Target (working fine in simulator)

2010-09-01 Thread Taylor Singletary
Hi Karthik,

Make sure that the time on your device is in sync with Twitter's clocks.

We return our current time in the Date HTTP header of every
response. One easy way to fixate an application's clock with our servers is
to issue a HTTP HEAD request to http://api.twitter.com/1/help/test.xml --
it's a non-rate-limited request and will allow you to adjust your clock in
relation to ours.

The oauth_timestamp in your example here is for Dec 31st, 2009.

Taylor

On Wed, Sep 1, 2010 at 9:10 AM, Karthik karthikduraisw...@gmail.com wrote:

 Hi ,

 I am developing a Twitter application in MTK (Media tek ) platform.

 I am using Oauth and and My application has the X-auth permission

 I am first  using POST with required params and the am using below URL

 https://api.twitter.com/oauth/access_token
   to get the access token in exchange with the username,
 password.

 I am able to get the access token and My application is working fine
 in the simulator (I ma using the proxy server in simulator)

 But in the Mobile (I amm not using proxy) , when I post
 https://api.twitter.com/oauth/access_token
 I am always getting 401 - Unauthorized (Failed to validate oauth
 signature and token)

 The below is my sample input string to get the signature (hmac-sha1)

 POSThttp%3A%2F%2Fapi.twitter.com%2Foauth
 %2Faccess_tokenoauth_consumer_key%3D4dsadsadsasdsd%26oauth_nonce
 %3D1262304301%26oauth_signature_method%3DHMAC-SHA1%26oauth_timestamp
 %3D1262304300%26oauth_version%3D1.0%26x_auth_mode%3Dclient_auth
 %26x_auth_password%3Dtest1234%26x_auth_username%3Dnareshs
 %2540google.com


 Please someone help me to resolve this issue..





 --
 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?hl=en


-- 
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?hl=en