Hello all, I'm trying to use the JavaScript API from http://code.google.com/p/oauth to implement OAuth with Twitter and get a user's timeline.
I'm able to complete the OAuth steps, but I'm unable to call the API afterward. When I call the API, it results in a 401 and I'm prompted to login with basic authentication. My OAuth Application is at http://twitter.com/oauth_clients/details/11183 and I'm authenticating as "mraible". The URL I'm signing is http://twitter.com/statuses/user_timeline.xml?oauth_token=$1 - where $1 is the oauth_token I receive after authorizing. Here's the output I get from a servlet I'm using to proxy the requests. INFO: No credentials available for BASIC 'Twitter API'@twitter.com:80 [DEBUG] GZipped: true [DEBUG] Received status code: 401 [DEBUG] Response: <?xml version="1.0" encoding="UTF-8"?> <hash> <request>/oauth/access_token? oauth_consumer_key=B4JEOnHccXp242Z5V9vw&oauth_nonce=6O2Nre&oauth_signature_method=HMAC- SHA1&oauth_timestamp=1245255164&oauth_token=DzB6gLSnew2sZKxbsEX9vgnlFo2D1NN1t5bHUy5TNFI&oauth_version=1.0&oauth_signature=zGkn6Fxf7Ac9lxHGLidPoSFMTNw=</ request> <error>Invalid / expired Token</error> </hash> Jun 17, 2009 10:12:48 AM org.apache.commons.httpclient.HttpMethodBase processCookieHeaders WARNING: Cookie rejected: "$Version=0; _twitter_sess=BAh7BiIKZmxhc2hJQzonQWN0aW9uQ29udHJvbGxlcjo6Rmxhc2g6OkZsYXNo %250ASGFzaHsABjoKQHVzZWR7AA%253D %253D--1164b91ac812d853b877e93ddb612b7471bebc74; $Path=/; $Domain=.twitter.com". Illegal domain attribute ".twitter.com". Domain of origin: "twitter.com" [DEBUG] GZipped: true [DEBUG] Received status code: 401 [DEBUG] Response: Failed to validate oauth signature or token Any help is greatly appreciated. Thanks, Matt
