I have a small sample application I use for testing. This uses a saved
token and key.
The application works fine. I am able to get timelines, post status
updates, etc.

When moving this application to another system I now get the
"invalid / used nonce" on calls to the twitter api from this
application when using it on the new system.

I have three systems I have tried, two work and one does not. The
error "invalid /used nonce" does not tell me what is wrong. All the
systems have the same version of java and are running the exact same
application code.

Below is some trace information. Does anyone see something wrong with
my signature in the failing system vs the working systems.

Computer A (SUCCESS):
Info sigBase: GET&http%3A%2F%2Fapi.twitter.com%2F1%2Fstatuses
%2Fhome_timeline.xml&oauth_consumer_key%3DCKEY%26oauth_nonce
%3D2887595401430130447%26oauth_signature_method%3DHMAC-
SHA1%26oauth_timestamp%3D1276825592%26oauth_token%3DATOKEN
%26oauth_version%3D1.0
Info url: http://api.twitter.com/1/statuses/home_timeline.xml
Info return: resp:<?xml version="1.0" encoding="UTF-8"?><statuses
type="array"><status>  <created_at>Fri Jun 11 16:57:45 +0000 2010</
created_at>…….</statuses>

Computer B (SUCCESS):
Info sigBase: GET&http%3A%2F%2Fapi.twitter.com%2F1%2Fstatuses
%2Fhome_timeline.xml&oauth_consumer_key%3DCKEY%26oauth_nonce
%3D6453132097719094794%26oauth_signature_method%3DHMAC-
SHA1%26oauth_timestamp%3D1276825993%26oauth_token%3DATOKEN
%26oauth_version%3D1.0
Info url: http://api.twitter.com/1/statuses/home_timeline.xml
Info return: resp:<?xml version="1.0" encoding="UTF-8"?><statuses
type="array"><status>  <created_at>Fri Jun 11 16:57:45 +0000 2010</
created_at>……..</statuses>

Computer C (FAIL):
Info sigBase: GET&http%3A%2F%2Fapi.twitter.com%2F1%2Fstatuses
%2Fhome_timeline.xml&oauth_consumer_key%3DCKEY%26oauth_nonce
%3D4424748944999180113%26oauth_signature_method%3DHMAC-
SHA1%26oauth_timestamp%3D1276818453%26oauth_token%3DATOKEN
%26oauth_version%3D1.0
Info url: http://api.twitter.com/1/statuses/home_timeline.xml

ERROR during token access exchange: java.io.IOException: Server
returned HTTP response code: 401 for URL: 
http://api.twitter.com/1/statuses/home_timeline.xml

Extended error response: <?xml version="1.0" encoding="UTF-8"?><hash>
<request>/1/statuses/home_timeline.xml</request>  <error>Invalid /
used nonce</error></hash>

Reply via email to