* Berto <mstbe...@gmail.com> [100302 13:28]:
> At first I thought this might be because HttpURLConnection wasn't
> handling SSL, but then I switched over to HttpPost (this code is in
> Java) which I know will handle SSL and I'm still getting a 401.  I'm
> doing everything the same as with oauth, except passing the request
> token (I'm not even getting a request token any more) and I'm passing
> the x_auth_* parameters as regular parameters in the POST body.  The
> three x_auth_* parameters are my only parameters and the normal OAuth
> header is in the "Authorization" field.  I'm POSTing to the new access
> URL as specified in the xAuth docs with no success .
> 
> Thoughts anyone?  I feel like such a noob asking for so much help with
> oAuth/xAuth :\.

I have successfully implemented xAuth in the Perl Net::Twitter library.
Here's what a Net::Twitter generated xAuth request looks like:

    GET 
https://twitter.com/oauth/access_token?oauth_consumer_key=CONSUMER_KEY&oauth_nonce=t7exD9FGmYkMfi0PIYGdlXnlF04&oauth_signature=E3ef0zZ%2B%2Btnaf7tQdTDu2znFyjI%3D&oauth_signature_method=HMAC-SHA1&oauth_timestamp=1267565624&oauth_version=1.0&x_auth_mode=client_auth&x_auth_password=secret&x_auth_username=fred
    User-Agent: Net::Twitter/3.11008 (Perl)
    X-Twitter-Client: Perl Net::Twitter
    X-Twitter-Client-URL: http://search.cpan.org/dist/Net-Twitter/
    X-Twitter-Client-Version: 3.11008


For this example, I used:

   consumer_key    = 'CONSUMER_KEY'
   consumer_secret = 'CONSUMER_SECRET'
   x_auth_username = 'fred'
   x_auth_secret   = 'secret'

Hope this helps.

@semifor

Reply via email to