[twitter-dev] Retweets not showing up?

2010-06-08 Thread Berto
I'm looking at home_timeline it doesn't seem like retweets are showing
up for me?  Also, what type of retweets are supposed to show up in
mentions?  Users that retweeted a mention of you I assume?

Neither of these things seem to be working for me.  Anyone else seeing
this?


[twitter-dev] Re: posting twitter updates using oauth and java question

2010-04-23 Thread Berto
You could try ordering your request parameters.  I know that isn't
required for the oauth spec, but I remember having to do that with a
problem I was facing when making oauth requests where I'd get a 401:
http://groups.google.com/group/twitter-development-talk/browse_thread/thread/7301cc9b210f585a/9cd5a6d47477ecc4.

On Apr 22, 3:45 pm, colin gray cgswts...@gmail.com wrote:
 Hello,
 I'm trying to post to the twitter update status api using oauth and
 I'm getting a 401 without any other error information.  I'm posting 
 tohttp://api.twitter.com/1/statuses/update.xmlwith a parameter of
 status=testing twitter! and a access token and access secret
 generated by twitter/oauth.  I've tried generating new tokens both for
 the twitter application and the twitter user account.  I feel
 everything is valid, any ideas?

 ?xml version = 1.0 encoding=UTF-8?
 hash
   request/1/statuses/update.xml/request
   errorCould not authenticate you./error
 /hash

 http request is:
 HTTP request = POST /1/statuses/update.xml
 Content-Type: application/x-www-form-urlencoded
 User-Agent: Jakarta Commons-HttpClient/3.1
 Host: api.twitter.com
 Content-Length: 277

 status=testing%20Twitter
 %21oauth_token=sWtx2nmAyBaFLzh5WbR6gGRHV9KjF7TFnioJCt87ubsoauth_consumer_key=Xc8W0rJuwkLPdfTngewBgoauth_signature_method=HMAC-
 SHA1oauth_timestamp=1271968710oauth_nonce=162012765462908oauth_version=1.0oauth_signature=KrLsQjVHUKoZHVPgAaKCqSXLdDI
 %3D

 response is:
 HTTP response = HTTP/1.1 401 Unauthorized
 Date: Thu, 22 Apr 2010 20:38:33 GMT
 Server: hi
 Status: 401 Unauthorized
 WWW-Authenticate: Basic realm=Twitter API
 X-Runtime: 0.00163
 Content-Type: application/xml; charset=utf-8
 Content-Length: 143
 Cache-Control: no-cache, max-age=1800
 Set-Cookie: guest_id=127196871321167215; path=/; expires=Sat, 22 May
 2010 20:38:33 GMT
 Set-Cookie:
 _twitter_sess=BAh7CDoPY3JlYXRlZF9hdGwrCPxJPicoAToHaWQiJTg1ZjE0YzNmYjMyZjFm
 %250AZjM3MTdmNDM3MTAxNGEyODI5IgpmbGFzaElDOidBY3Rpb25Db250cm9sbGVy
 %250AOjpGbGFzaDo6Rmxhc2hIYXNoewAGOgpAdXNlZHsA--4b722ac7a438e73c757947649e1d189f1fc9f29a;
 domain=.twitter.com; path=/
 Expires: Thu, 22 Apr 2010 21:08:33 GMT
 Vary: Accept-Encoding
 Connection: close

 ?xml version=1.0 encoding=UTF-8?
 hash
   request/1/statuses/update.xml/request
   errorCould not authenticate you./error
 /hash
 

 --
 Subscription 
 settings:http://groups.google.com/group/twitter-development-talk/subscribe?hl=en


[twitter-dev] Re: 401 Unauthorised - Unable to post

2010-04-23 Thread Berto
Did you acquire a new token before trying to post again?  I'm not
positive, but if you didn't, it may be that the old token only had
read permissions and didn't get updated to read/write when you changed
your settings.

On Apr 23, 7:17 am, Jeremy jehe...@gmail.com wrote:
 Hi all!

 I am having an issue with one of my apps. I set it up correctly I
 think, when I do tests through the API console 
 onhttp://dev.twitter.com/console,
 it posts just fine, and my app has read/write access level.

 However on my site, whenever I try to post a new tweet, the tweet
 process seems to go without any error messages, but nothing gets
 posted on my twitter account.
 I have checked it with Firebug, there is in fact an error, I get a 401
 Unauthorised status forhttps://api.twitter.com/1/statuses/update.json.
 It says Read-only application cannot POST.

 I consequently changed my app settings, and indeed it was read only at
 first, but even after changing it to read/write, the problem remains.
 Any idea where it could come from? What can I do to solve the issue?

 Thank you!

 --
 Subscription 
 settings:http://groups.google.com/group/twitter-development-talk/subscribe?hl=en


Re: [twitter-dev] Redirecting to a user's profile

2010-04-18 Thread Berto
Correct. But it won't show protected profiles because the user is not
logged in. I'd like a way to log in the user before taking them to
that link so they don't have to go through the hassle of signing in
just to see the profile of a person they're already friends with.
Some api endpoint I could pass the access token I have for them so
that I could redirect them to a profile without logging them in. Is
this possible?

Sorry I worded that a little weird the first time.

Thanks!

Abraham Williams wrote:
 It does not prompt me for authentication when I am not logged in. Neither
 for public or protected accounts.

 Abraham

 On Fri, Apr 16, 2010 at 10:09, Berto mstbe...@gmail.com wrote:

  So I was able to find this handy call:
  http://twitter.com/account/redirect_by_id?id=ID
  by perusing the groups, but I was curious if there was an authenticate
  call I could pass this as a redirect URL to?  It seems like the oauth/
  authenticate end-point might do what I'm wanting, but I'm unsure and
  if it does, I'm unsure of how exactly to use it.
 
  What I'm trying to do is display a link to the user's web profile,
  which works fine.  The problem is, it will ask them to log in if they
  aren't already logged in on the browser even though I have an auth
  token for them.  Any easy way to do this?
 
 
  --
  Subscription settings:
  http://groups.google.com/group/twitter-development-talk/subscribe?hl=en
 



 --
 Abraham Williams | Developer for hire | http://abrah.am
 PoseurTech Labs | Projects | http://labs.poseurtech.com
 This email is: [ ] shareable [x] ask first [ ] private.


[twitter-dev] Redirecting to a user's profile

2010-04-16 Thread Berto
So I was able to find this handy call: 
http://twitter.com/account/redirect_by_id?id=ID
by perusing the groups, but I was curious if there was an authenticate
call I could pass this as a redirect URL to?  It seems like the oauth/
authenticate end-point might do what I'm wanting, but I'm unsure and
if it does, I'm unsure of how exactly to use it.

What I'm trying to do is display a link to the user's web profile,
which works fine.  The problem is, it will ask them to log in if they
aren't already logged in on the browser even though I have an auth
token for them.  Any easy way to do this?


-- 
Subscription settings: 
http://groups.google.com/group/twitter-development-talk/subscribe?hl=en


[twitter-dev] Re: xAuth

2010-03-08 Thread Berto
To follow up, this works for me now.  It looks like Twitter's cache
was not showing me as having xAuth access so it appears that
converting to xAuth is as easy as it seems ;).

On Mar 5, 4:22 pm, Taylor Singletary taylorsinglet...@twitter.com
wrote:
 Hi Berto,

 I can confirm that using POST operations over HTTPs will work for XAuth.

 Your URL should only contain:https://api.twitter.com/oauth/access_token

 Your signature base string should contain the x_auth_* parameters.

 Your authorization string should not contain the x_auth_* parameters.

 Here's a replay of a successful request:

 Full Request URI:https://api.twitter.com/oauth/access_token

 Signature Base String:
 POSThttps%3A%2F%2Fapi.twitter.com
 %2Foauth%2Faccess_tokenoauth_consumer_key%3Dri8JxxxdwSV5xIUfNNvQ%26oauth_nonce%3DNI14r4hzKMlslKakhjeOaHoIeWw53ZMeTJb4zAaZh2o%26oauth_signature_method%3DHMAC-SHA1%26oauth_timestamp%3D1267826670%26oauth_version%3D1.0%26x_auth_mode%3Dclient_auth%26x_auth_password%Dxxx%26x_auth_username%3De

 Example response:
 oauth_token=1234-torCkTs0XK7H2Y2i1ee5iofXyzp7aayeEXRTmlwoauth_token_secret=Xyz0gOZHNQKPooBiWCZRY81klwS3kLZGa2wcuser_id=1234screen_name=ex_auth_expires=0

 Keep in mind that your signing secret will not include an
 oauth_token_secret, so will be the equivalent of {consumer_secret}

 Taylor

 On Fri, Mar 5, 2010 at 12:09 PM, Berto mstbe...@gmail.com wrote:
  Three days and I still can't get this to work.  I even tried switching
  over to GET instead of POST and it tells me Failed to validate oauth
  signature and token.  This is fully functional for regular oauth.
  Signature Base String is:

  Signature Base String: Signature Base String:
  GEThttps%3A%2F%2Fapi.twitter.com%2Foauth
  %2Faccess_tokenoauth_consumer_key%3DCONSUMER KEY%26oauth_nonce
  %3D1267819560%26oauth_signature_method%3DHMAC-SHA1%26oauth_timestamp
  %3D1267819217%26oauth_version%3D1.0%26x_auth_mode%3Dclient_auth
  %26x_auth_password%3Dpass%26x_auth_username%3Duser

  I'm sending oauth parameters via the Authorization header and the
  three xAuth parameters as GET parameters (?
  x_auth_username=userx_auth_pass=passx_auth_mode=client_auth).

  It appears as though everyone who had oauth working before had an easy
  transition so I'm just a little curious why mine isn't working when I
  literally have only changed the URL and three parameters.  I've
  verified this is going over SSL as well.

  Any help is appreciated.

  Thanks.
  On Mar 4, 3:34 pm, Anton Krasovsky anton.krasov...@gmail.com wrote:
   In case if anyone's interested (though I doubt there are many
   Erlang'ers on the list),
   I just addedxAuthsupport to twerl.

  http://github.com/ak1394/twerl

   Regards,
   Anton

   On Wed, Mar 3, 2010 at 4:57 PM, Berto mstbe...@gmail.com wrote:
Raffi,

Can you comment on the first part of Marc's last reply?

Thanks!

On Mar 3, 9:24 am, Marc Mims marc.m...@gmail.com wrote:
* Berto mstbe...@gmail.com [100303 06:42]:

 Isn't that using a GET request versus the docs saying POST?  And I
 thought parameters were supposed to be normalized except for
  signature
 which gets attached at the end?

Hmmm. I completely missed the fact that the documentation specifies
POST.  I used GET and it worked.  When I use a POST, I get a 401.

Doc bug?

The order you *send* the parameters doesn't matter---the order of the
base string used for generating the signature does.

The underlying libraries I use assemble the parameters in an arbitrary
order.  Generation of the signature is a separate call and builds it's
own base string from a hash (associative array).

@semifor


[twitter-dev] Re: xAuth

2010-03-05 Thread Berto
Three days and I still can't get this to work.  I even tried switching
over to GET instead of POST and it tells me Failed to validate oauth
signature and token.  This is fully functional for regular oauth.
Signature Base String is:

Signature Base String: Signature Base String:
GEThttps%3A%2F%2Fapi.twitter.com%2Foauth
%2Faccess_tokenoauth_consumer_key%3DCONSUMER KEY%26oauth_nonce
%3D1267819560%26oauth_signature_method%3DHMAC-SHA1%26oauth_timestamp
%3D1267819217%26oauth_version%3D1.0%26x_auth_mode%3Dclient_auth
%26x_auth_password%3Dpass%26x_auth_username%3Duser

I'm sending oauth parameters via the Authorization header and the
three xAuth parameters as GET parameters (?
x_auth_username=userx_auth_pass=passx_auth_mode=client_auth).

It appears as though everyone who had oauth working before had an easy
transition so I'm just a little curious why mine isn't working when I
literally have only changed the URL and three parameters.  I've
verified this is going over SSL as well.

Any help is appreciated.

Thanks.
On Mar 4, 3:34 pm, Anton Krasovsky anton.krasov...@gmail.com wrote:
 In case if anyone's interested (though I doubt there are many
 Erlang'ers on the list),
 I just addedxAuthsupport to twerl.

 http://github.com/ak1394/twerl

 Regards,
 Anton

 On Wed, Mar 3, 2010 at 4:57 PM, Berto mstbe...@gmail.com wrote:
  Raffi,

  Can you comment on the first part of Marc's last reply?

  Thanks!

  On Mar 3, 9:24 am, Marc Mims marc.m...@gmail.com wrote:
  * Berto mstbe...@gmail.com [100303 06:42]:

   Isn't that using a GET request versus the docs saying POST?  And I
   thought parameters were supposed to be normalized except for signature
   which gets attached at the end?

  Hmmm. I completely missed the fact that the documentation specifies
  POST.  I used GET and it worked.  When I use a POST, I get a 401.

  Doc bug?

  The order you *send* the parameters doesn't matter---the order of the
  base string used for generating the signature does.

  The underlying libraries I use assemble the parameters in an arbitrary
  order.  Generation of the signature is a separate call and builds it's
  own base string from a hash (associative array).

  @semifor


[twitter-dev] Re: xAuth

2010-03-03 Thread Berto
Isn't that using a GET request versus the docs saying POST?  And I
thought parameters were supposed to be normalized except for signature
which gets attached at the end?

On Mar 2, 3:40 pm, Marc Mims marc.m...@gmail.com wrote:
 * 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:

     
 GEThttps://twitter.com/oauth/access_token?oauth_consumer_key=CONSUMER_KE...
     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


[twitter-dev] Re: xAuth

2010-03-03 Thread Berto
Raffi,

Can you comment on the first part of Marc's last reply?

Thanks!

On Mar 3, 9:24 am, Marc Mims marc.m...@gmail.com wrote:
 * Berto mstbe...@gmail.com [100303 06:42]:

  Isn't that using a GET request versus the docs saying POST?  And I
  thought parameters were supposed to be normalized except for signature
  which gets attached at the end?

 Hmmm. I completely missed the fact that the documentation specifies
 POST.  I used GET and it worked.  When I use a POST, I get a 401.

 Doc bug?

 The order you *send* the parameters doesn't matter---the order of the
 base string used for generating the signature does.

 The underlying libraries I use assemble the parameters in an arbitrary
 order.  Generation of the signature is a separate call and builds it's
 own base string from a hash (associative array).

 @semifor


[twitter-dev] Re: What would you have liked to have known when you started?

2010-03-02 Thread Berto
The OAuth option instead of beginning with Basic Auth.  Transitioning
from that was a little messy, but once things were up and running, it
was so much nicer than having to use Basic Auth.

On Feb 28, 4:11 pm, Abraham Williams 4bra...@gmail.com wrote:
 What tip, trick, or tidbit of information do you wish you had known when you
 started working with the Twitter API?

 If I had known about the 3,200 status pagination limit I would have started
 archiving my timeline back then and have a personal searchable index of all
 my posts now.

 What about you?

 Abraham

 --
 Abraham Williams | Community Advocate |http://abrah.am
 TwitterOAuth |http://github.com/abraham/twitteroauth
 This email is: [ ] shareable [x] ask first [ ] private.


[twitter-dev] Re: xAuth

2010-03-02 Thread Berto
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 :\.

On Mar 2, 9:43 am, Isaiah Carew isa...@me.com wrote:
 Try passing in nil as the token.  The access token request should be similar 
 to how you used to perform the request token request.

 The best explanation (and they one that helped me) is from Steve Reynolds:  
 http://ke-we.net/7u

 isaiahhttp://twitter.com/isaiah

 On Mar 1, 2010, at 1:26 PM, Berto wrote:

  Hey Isaiah,

  What do you mean by default token?  I'm working on getting xAuth
  implemented, but I seem to get a 401 even though I received an email I
  was approved.  I've tried using a token I get from request_token
  (which from your reply, doesn't seem like I need to be doing) and not
  passing a token at all.

  On Feb 27, 1:45 pm, Isaiah Carew isa...@me.com wrote:
  i did manage to get xauth working this morning thanks to @SteveReynolds.  
  the big epiphany (Steve's, not mine) was that there is no token exchange 
  at all.  in fact you don't even seem to need to acquire a request token 
  ever.  you simply jump directly to the auth token request and pass in your 
  default token.

  it seems to make sense to me now, it was just a leap that i didn't make on 
  my own.

  i just thought i'd post this in case anyone else out there is stuck too.

  when it's a bit more cleaned up, i'll post my results to github.

  isaiahhttp://twitter.com/isaiah

  On Feb 27, 2010, at 9:37 AM, Aral Balkan wrote:

  Like a n00b, I didn't include the id of my app in my original support 
  request (I hadn't registered it since I wasn't using oAuth previously) 
  and so it looks like I've missed the initial boat :( Got a message back 
  asking for my app id so I registered Feathers and got back to the ticket 
  but apparently the Twitter helpdesk/zendesk is down 
  (http://help.twitter.com) so not sure if my ticket was updated.

  Would really appreciate it if anyone can look into the ticket (Ticket 
  #863920)

  Thanks :)

  Aral

  On Sat, Feb 27, 2010 at 6:47 AM, Isaiah Carew isa...@me.com wrote:

  So, I received the xAuth green light.  Yeah!!!

  Unfortunately, the email was not very detailed about which app was 
  enabled (I have 3).  (and for the record I was very detailed in my 
  request about which one I was requesting access for).
  snip


[twitter-dev] Re: xAuth

2010-03-01 Thread Berto
Hey Isaiah,

What do you mean by default token?  I'm working on getting xAuth
implemented, but I seem to get a 401 even though I received an email I
was approved.  I've tried using a token I get from request_token
(which from your reply, doesn't seem like I need to be doing) and not
passing a token at all.

On Feb 27, 1:45 pm, Isaiah Carew isa...@me.com wrote:
 i did manage to get xauth working this morning thanks to @SteveReynolds.  the 
 big epiphany (Steve's, not mine) was that there is no token exchange at all.  
 in fact you don't even seem to need to acquire a request token ever.  you 
 simply jump directly to the auth token request and pass in your default token.

 it seems to make sense to me now, it was just a leap that i didn't make on my 
 own.

 i just thought i'd post this in case anyone else out there is stuck too.

 when it's a bit more cleaned up, i'll post my results to github.

 isaiahhttp://twitter.com/isaiah

 On Feb 27, 2010, at 9:37 AM, Aral Balkan wrote:

  Like a n00b, I didn't include the id of my app in my original support 
  request (I hadn't registered it since I wasn't using oAuth previously) and 
  so it looks like I've missed the initial boat :( Got a message back asking 
  for my app id so I registered Feathers and got back to the ticket but 
  apparently the Twitter helpdesk/zendesk is down (http://help.twitter.com) 
  so not sure if my ticket was updated.

  Would really appreciate it if anyone can look into the ticket (Ticket 
  #863920)

  Thanks :)

  Aral

  On Sat, Feb 27, 2010 at 6:47 AM, Isaiah Carew isa...@me.com wrote:

  So, I received the xAuth green light.  Yeah!!!

  Unfortunately, the email was not very detailed about which app was enabled 
  (I have 3).  (and for the record I was very detailed in my request about 
  which one I was requesting access for).
  snip


[twitter-dev] Re: Encoding issues with OAuth

2010-02-26 Thread Berto
Yeah, you were correct.  My encode() function was doing something
whacky with +'s.

On Feb 25, 8:42 am, Berto mstbe...@gmail.com wrote:
 So I've been able to get everything working except for posting things
 with spaces or any special characters that get encoded.  All of the
 regular oauth parameters are being encoded correctly, because anything
 without any extra parameters works fine so I'm not quite sure what
 needs to be fixed.  A good example is posting a status.  If I go to
 post a status, I get:

 With the status: Test!:
 Signature Base String: POSThttp%3A%2F%2Fwww.twitter.com%2Fstatuses
 %2Fupdate.jsonoauth_consumer_key%3DZhJuTh3GCDkGIDm2R4ocNQ
 %26oauth_nonce%3D1267108786%26oauth_signature_method%3DHMAC-
 SHA1%26oauth_timestamp%3D1267108589%26oauth_token%3D111605519-
 cDU56Y7CYcZyTSdEIjFIWqMLyPzpPDnOpIzz80sH%26oauth_version%3D1.0%26status
 %3DTest%2521

 And a final POST request of:

 { POST url =http://www.twitter.com/statuses/update.json, params =
 oauth_consumer_key=ZhJuTh3GCDkGIDm2R4ocNQoauth_nonce=1267108786oauth_signature_method=HMAC-
 SHA1oauth_timestamp=1267108589oauth_token=111605519-
 cDU56Y7CYcZyTSdEIjFIWqMLyPzpPDnOpIzz80sHoauth_version=1.0status=Test
 %2521oauth_signature=eiLdCr8fCXcUpFxsOPn9vtK%2BCZw%3D }

 If I try one with spaces (This is a test), I get:

  Signature Base String: POSThttp%3A%2F%2Fwww.twitter.com%2Fstatuses
 %2Fupdate.jsonoauth_consumer_key%3DZhJuTh3GCDkGIDm2R4ocNQ
 %26oauth_nonce%3D1267109321%26oauth_signature_method%3DHMAC-
 SHA1%26oauth_timestamp%3D1267108551%26oauth_token%3D111605519-
 cDU56Y7CYcZyTSdEIjFIWqMLyPzpPDnOpIzz80sH%26oauth_version%3D1.0%26status
 %3DThis%2Bis%2Ba%2Btest

 { POST url =http://www.twitter.com/statuses/update.json, params =
 oauth_consumer_key=ZhJuTh3GCDkGIDm2R4ocNQoauth_nonce=1267109321oauth_signature_method=HMAC-
 SHA1oauth_timestamp=1267108551oauth_token=111605519-
 cDU56Y7CYcZyTSdEIjFIWqMLyPzpPDnOpIzz80sHoauth_version=1.0status=This
 %2Bis%2Ba%2Btestoauth_signature=4ENIpGIfzU3nY74%2FFIYTYRboHEQ%3D }

 Anyone have an idea of where I'm encoding incorrectly or if perhaps my
 parameters are in the incorrect order?  I tried reading the oauth spec
 and perusing the archives, but to no avail.


[twitter-dev] Re: OAuth create favorite fails

2010-02-25 Thread Berto
I'm by no means an expert here, but it sounds like an encoding issue
when you're creating your signature.  Try posting a status update.
Can you post anything with spaces/special characters or can you post
only one word with no special characters?  I remember having that
problem when I tried to post stuff.

-Berto

On Feb 25, 6:39 am, twittme_mobi nlupa...@googlemail.com wrote:
 Hello,

 I am moving my twitter app to OAUTH.
 I am fine with most of the URLs/use case but I have problem with
 favorites/create and favorites/destroy/

 For example, If I login with OAuth , i could view the friends timelen,
 check for
 existing block and follows between users but when I try to create a
 favorite, I would get
 as a response:

 {request:/1/favorites/create/9623635886.json,error:Incorrect
 signature}Array ( [request] = /1/favorites/create/9623635886.json
 [error] = Incorrect signature )  OAUTH

 Any help is highly appreciated.

 thanks.


[twitter-dev] Encoding issues with OAuth

2010-02-25 Thread Berto
So I've been able to get everything working except for posting things
with spaces or any special characters that get encoded.  All of the
regular oauth parameters are being encoded correctly, because anything
without any extra parameters works fine so I'm not quite sure what
needs to be fixed.  A good example is posting a status.  If I go to
post a status, I get:

With the status: Test!:
Signature Base String: POSThttp%3A%2F%2Fwww.twitter.com%2Fstatuses
%2Fupdate.jsonoauth_consumer_key%3DZhJuTh3GCDkGIDm2R4ocNQ
%26oauth_nonce%3D1267108786%26oauth_signature_method%3DHMAC-
SHA1%26oauth_timestamp%3D1267108589%26oauth_token%3D111605519-
cDU56Y7CYcZyTSdEIjFIWqMLyPzpPDnOpIzz80sH%26oauth_version%3D1.0%26status
%3DTest%2521

And a final POST request of:

{ POST url = http://www.twitter.com/statuses/update.json, params =
oauth_consumer_key=ZhJuTh3GCDkGIDm2R4ocNQoauth_nonce=1267108786oauth_signature_method=HMAC-
SHA1oauth_timestamp=1267108589oauth_token=111605519-
cDU56Y7CYcZyTSdEIjFIWqMLyPzpPDnOpIzz80sHoauth_version=1.0status=Test
%2521oauth_signature=eiLdCr8fCXcUpFxsOPn9vtK%2BCZw%3D }

If I try one with spaces (This is a test), I get:

 Signature Base String: POSThttp%3A%2F%2Fwww.twitter.com%2Fstatuses
%2Fupdate.jsonoauth_consumer_key%3DZhJuTh3GCDkGIDm2R4ocNQ
%26oauth_nonce%3D1267109321%26oauth_signature_method%3DHMAC-
SHA1%26oauth_timestamp%3D1267108551%26oauth_token%3D111605519-
cDU56Y7CYcZyTSdEIjFIWqMLyPzpPDnOpIzz80sH%26oauth_version%3D1.0%26status
%3DThis%2Bis%2Ba%2Btest

{ POST url = http://www.twitter.com/statuses/update.json, params =
oauth_consumer_key=ZhJuTh3GCDkGIDm2R4ocNQoauth_nonce=1267109321oauth_signature_method=HMAC-
SHA1oauth_timestamp=1267108551oauth_token=111605519-
cDU56Y7CYcZyTSdEIjFIWqMLyPzpPDnOpIzz80sHoauth_version=1.0status=This
%2Bis%2Ba%2Btestoauth_signature=4ENIpGIfzU3nY74%2FFIYTYRboHEQ%3D }

Anyone have an idea of where I'm encoding incorrectly or if perhaps my
parameters are in the incorrect order?  I tried reading the oauth spec
and perusing the archives, but to no avail.


[twitter-dev] Re: Introduce yourself!

2010-02-24 Thread Berto
Hey all,

I'm Berto Murillo (@mstberto) and I'm from Missouri.  Graduated last
year and am now a Software Engineer.  In my spare time, I've built two
Twitter clients (C++ and Java).   The feature I'd like to see most
added has already been said multiple times, and that's the
conversation method.  This is an awesome list with a lot of help, so
thanks :D.

So. Who are you, what do you do, what have you built, and what feature
do
you most want to see added?

On Feb 24, 1:11 am, Patrick kenned...@gmail.com wrote:
 Hi, I'm Patrick Kennedy, and I grew up in Hawaii.  I have worked with
 Department of State for several years now, currently in Vietnam, and
 next up, Laos - definitely your S/E Asian connection - come and visit
 anytime. :-)   Anyways, I created a buggy twitter client in PHP (Basic
 Auth), and I am becoming very capable with OAuth coding now.  I hope
 to release something cool by June, but who knows. While I may not be
 the best programmer in the world, I find Twitter to be a super fun way
 to get into coding.  Often my shortcomings are with things that are
 difficult for many - like regex, etc - and if I had more access and
 code, I'd be 100 times better.  Even so, I enjoy the open API twitter
 fun of it, and I hope to make something useful and cool in the not-too-
 distant future.  Most of my coding is with PHP, but I am going to try
 out RoR pretty soon.


[twitter-dev] Re: oauth request token failing

2010-02-18 Thread Berto
Even with the URL like this:

http://twitter.com/oauth/request_token?oauth_consumer_key=valueoauth_nonce=1266501098oauth_signature_method=HMAC-SHA1oauth_timestamp=1266500348oauth_version=1.0oauth_signature=eGALeAVpxt4CB%2FuHfkLq51%2FWXRk%3D

It still fails for me.  I've gotta be missing something obvious.  Does
anything need to go into my header?

On Feb 17, 9:47 pm, Ryan Alford ryanalford...@gmail.com wrote:
 You order all parameters EXCEPT the signature, then create the signature,
 then append the signature to the end.  All other parameters should be in
 order.

 Ryan

 On Wed, Feb 17, 2010 at 6:42 PM, Berto mstbe...@gmail.com wrote:
  I thought that was only for the signature which is in the right
  order?

  Ryan Alford wrote:
   Your querystring parameters are in the wrong order.  You have the
   oauth_nonce AFTER oauth_timestamp.  It needs to be before it.  The
   parameters must be in order.

   Ryan

   Sent from my DROID

   On Feb 17, 2010 6:18 PM, Berto mstbe...@gmail.com wrote:

   To answer the first email, I was doing that so I could put it in the
   request header's authorization field to get this effect:

   (Taken from oauth.net)
   Authorization: OAuth realm=http://sp.example.com/;,
                  oauth_consumer_key=0685bd9184jfhq22,
                  oauth_token=ad180jjd733klru7,
                  oauth_signature_method=HMAC-SHA1,
                  oauth_signature=wOJIO9A2W5mFwDgiDvZbTSMK%2FPY%3D,
                  oauth_timestamp=137131200,
                  oauth_nonce=4572616e48616d6d65724c61686176,
                  oauth_version=1.0

   Then, I thought it might need to go into the WWW-Authenticate field as
   opposed to the Authorization field so I tried that too with no
   success.

   I've also just tried formatting them as GET parameters and attaching
   them to the request URL, but that isn't working either.  It would look
   like:

  http://twitter.com/oauth/request_token?oauth_consumer_key=

  valueoauth_signature_method=HMAC-SHA1oauth_timestamp=1266440918oauth_nonce=1266440928oauth_version=1.0oauth_signature=l%2BYDrTyWGpvDu3owDlVQLakzVns%3D

   On Feb 17, 3:52 pm, Ryan Alford ryanalford...@gmail.com wrote:
Can you post the URL with querys...
On Wed, Feb 17, 2010 at 4:51 PM, Ryan Alford ryanalford...@gmail.com
   wrote:

 Why are you doing this?

 StringBuilder params = new StringBuilder();
             ...

 On Wed, Feb 17, 2010 at 2:37 PM, Berto mstbe...@gmail.com wrote:

 Hey guys,

 I'm w...


[twitter-dev] Re: oauth request token failing

2010-02-18 Thread Berto
GEThttp%3A%2F%2Ftwitter.com%2Foauth%2Frequest_tokenoauth_consumer_key
%3D8hvUTsGttoOBN2ygbDVJw%26oauth_nonce
%3D1266502068%26oauth_signature_method%3DHMAC-SHA1%26oauth_timestamp
%3D1266501208%26oauth_version%3D1.0

On Feb 18, 8:04 am, Ryan Alford ryanalford...@gmail.com wrote:
 Can you post the string that you hash to create the signature?

 Ryan

 On Thu, Feb 18, 2010 at 8:42 AM, Berto mstbe...@gmail.com wrote:
  Even with the URL like this:

 http://twitter.com/oauth/request_token?oauth_consumer_key=
  valueoauth_nonce=1266501098oauth_signature_method=HMAC-SHA1oauth_timestamp=1266500348oauth_version=1.0oauth_signature=eGALeAVpxt4CB%2FuHfkLq51%2FWXRk%3D

  It still fails for me.  I've gotta be missing something obvious.  Does
  anything need to go into my header?

  On Feb 17, 9:47 pm, Ryan Alford ryanalford...@gmail.com wrote:
   You order all parameters EXCEPT the signature, then create the signature,
   then append the signature to the end.  All other parameters should be in
   order.

   Ryan

   On Wed, Feb 17, 2010 at 6:42 PM, Berto mstbe...@gmail.com wrote:
I thought that was only for the signature which is in the right
order?

Ryan Alford wrote:
 Your querystring parameters are in the wrong order.  You have the
 oauth_nonce AFTER oauth_timestamp.  It needs to be before it.  The
 parameters must be in order.

 Ryan

 Sent from my DROID

 On Feb 17, 2010 6:18 PM, Berto mstbe...@gmail.com wrote:

 To answer the first email, I was doing that so I could put it in the
 request header's authorization field to get this effect:

 (Taken from oauth.net)
 Authorization: OAuth realm=http://sp.example.com/;,
                oauth_consumer_key=0685bd9184jfhq22,
                oauth_token=ad180jjd733klru7,
                oauth_signature_method=HMAC-SHA1,
                oauth_signature=wOJIO9A2W5mFwDgiDvZbTSMK%2FPY%3D,
                oauth_timestamp=137131200,
                oauth_nonce=4572616e48616d6d65724c61686176,
                oauth_version=1.0

 Then, I thought it might need to go into the WWW-Authenticate field
  as
 opposed to the Authorization field so I tried that too with no
 success.

 I've also just tried formatting them as GET parameters and attaching
 them to the request URL, but that isn't working either.  It would
  look
 like:

http://twitter.com/oauth/request_token?oauth_consumer_key=

  valueoauth_signature_method=HMAC-SHA1oauth_timestamp=1266440918oauth_nonce=1266440928oauth_version=1.0oauth_signature=l%2BYDrTyWGpvDu3owDlVQLakzVns%3D

 On Feb 17, 3:52 pm, Ryan Alford ryanalford...@gmail.com wrote:
  Can you post the URL with querys...
  On Wed, Feb 17, 2010 at 4:51 PM, Ryan Alford 
  ryanalford...@gmail.com
 wrote:

   Why are you doing this?

   StringBuilder params = new StringBuilder();
               ...

   On Wed, Feb 17, 2010 at 2:37 PM, Berto mstbe...@gmail.com
  wrote:

   Hey guys,

   I'm w...


[twitter-dev] Re: oauth request token failing

2010-02-18 Thread Berto
Fixed by putting an  after my consumer secret.  So essentially, it
was just that my parameters were out-of-order.

Thanks, Ryan!

On Feb 18, 9:01 am, Ryan Alford ryanalford...@gmail.com wrote:
 That looks fine.

 Are you using the Consumer Secret as the key to the hash?

 Ryan

 On Thu, Feb 18, 2010 at 9:10 AM, Berto mstbe...@gmail.com wrote:
  GEThttp%3A%2F%2Ftwitter.com%2Foauth%2Frequest_tokenoauth_consumer_key
  %3D8hvUTsGttoOBN2ygbDVJw%26oauth_nonce
  %3D1266502068%26oauth_signature_method%3DHMAC-SHA1%26oauth_timestamp
  %3D1266501208%26oauth_version%3D1.0

  On Feb 18, 8:04 am, Ryan Alford ryanalford...@gmail.com wrote:
   Can you post the string that you hash to create the signature?

   Ryan

   On Thu, Feb 18, 2010 at 8:42 AM, Berto mstbe...@gmail.com wrote:
Even with the URL like this:

   http://twitter.com/oauth/request_token?oauth_consumer_key=

  valueoauth_nonce=1266501098oauth_signature_method=HMAC-SHA1oauth_timestamp=1266500348oauth_version=1.0oauth_signature=eGALeAVpxt4CB%2FuHfkLq51%2FWXRk%3D

It still fails for me.  I've gotta be missing something obvious.  Does
anything need to go into my header?

On Feb 17, 9:47 pm, Ryan Alford ryanalford...@gmail.com wrote:
 You order all parameters EXCEPT the signature, then create the
  signature,
 then append the signature to the end.  All other parameters should be
  in
 order.

 Ryan

 On Wed, Feb 17, 2010 at 6:42 PM, Berto mstbe...@gmail.com wrote:
  I thought that was only for the signature which is in the right
  order?

  Ryan Alford wrote:
   Your querystring parameters are in the wrong order.  You have the
   oauth_nonce AFTER oauth_timestamp.  It needs to be before it.
   The
   parameters must be in order.

   Ryan

   Sent from my DROID

   On Feb 17, 2010 6:18 PM, Berto mstbe...@gmail.com wrote:

   To answer the first email, I was doing that so I could put it in
  the
   request header's authorization field to get this effect:

   (Taken from oauth.net)
   Authorization: OAuth realm=http://sp.example.com/;,
                  oauth_consumer_key=0685bd9184jfhq22,
                  oauth_token=ad180jjd733klru7,
                  oauth_signature_method=HMAC-SHA1,

   oauth_signature=wOJIO9A2W5mFwDgiDvZbTSMK%2FPY%3D,
                  oauth_timestamp=137131200,
                  oauth_nonce=4572616e48616d6d65724c61686176,
                  oauth_version=1.0

   Then, I thought it might need to go into the WWW-Authenticate
  field
as
   opposed to the Authorization field so I tried that too with no
   success.

   I've also just tried formatting them as GET parameters and
  attaching
   them to the request URL, but that isn't working either.  It would
look
   like:

  http://twitter.com/oauth/request_token?oauth_consumer_key=

  valueoauth_signature_method=HMAC-SHA1oauth_timestamp=1266440918oauth_nonce=1266440928oauth_version=1.0oauth_signature=l%2BYDrTyWGpvDu3owDlVQLakzVns%3D

   On Feb 17, 3:52 pm, Ryan Alford ryanalford...@gmail.com wrote:
Can you post the URL with querys...
On Wed, Feb 17, 2010 at 4:51 PM, Ryan Alford 
ryanalford...@gmail.com
   wrote:

 Why are you doing this?

 StringBuilder params = new StringBuilder();
             ...

 On Wed, Feb 17, 2010 at 2:37 PM, Berto mstbe...@gmail.com
wrote:

 Hey guys,

 I'm w...


[twitter-dev] Re: oauth request token failing

2010-02-18 Thread Berto
Correct.  I'm using the exact values provided from my application
registration.  And I've verified the algorithm works with the example
from the oauth spec.

On Feb 18, 9:01 am, Ryan Alford ryanalford...@gmail.com wrote:
 That looks fine.

 Are you using the Consumer Secret as the key to the hash?

 Ryan

 On Thu, Feb 18, 2010 at 9:10 AM, Berto mstbe...@gmail.com wrote:
  GEThttp%3A%2F%2Ftwitter.com%2Foauth%2Frequest_tokenoauth_consumer_key
  %3D8hvUTsGttoOBN2ygbDVJw%26oauth_nonce
  %3D1266502068%26oauth_signature_method%3DHMAC-SHA1%26oauth_timestamp
  %3D1266501208%26oauth_version%3D1.0

  On Feb 18, 8:04 am, Ryan Alford ryanalford...@gmail.com wrote:
   Can you post the string that you hash to create the signature?

   Ryan

   On Thu, Feb 18, 2010 at 8:42 AM, Berto mstbe...@gmail.com wrote:
Even with the URL like this:

   http://twitter.com/oauth/request_token?oauth_consumer_key=

  valueoauth_nonce=1266501098oauth_signature_method=HMAC-SHA1oauth_timestamp=1266500348oauth_version=1.0oauth_signature=eGALeAVpxt4CB%2FuHfkLq51%2FWXRk%3D

It still fails for me.  I've gotta be missing something obvious.  Does
anything need to go into my header?

On Feb 17, 9:47 pm, Ryan Alford ryanalford...@gmail.com wrote:
 You order all parameters EXCEPT the signature, then create the
  signature,
 then append the signature to the end.  All other parameters should be
  in
 order.

 Ryan

 On Wed, Feb 17, 2010 at 6:42 PM, Berto mstbe...@gmail.com wrote:
  I thought that was only for the signature which is in the right
  order?

  Ryan Alford wrote:
   Your querystring parameters are in the wrong order.  You have the
   oauth_nonce AFTER oauth_timestamp.  It needs to be before it.
   The
   parameters must be in order.

   Ryan

   Sent from my DROID

   On Feb 17, 2010 6:18 PM, Berto mstbe...@gmail.com wrote:

   To answer the first email, I was doing that so I could put it in
  the
   request header's authorization field to get this effect:

   (Taken from oauth.net)
   Authorization: OAuth realm=http://sp.example.com/;,
                  oauth_consumer_key=0685bd9184jfhq22,
                  oauth_token=ad180jjd733klru7,
                  oauth_signature_method=HMAC-SHA1,

   oauth_signature=wOJIO9A2W5mFwDgiDvZbTSMK%2FPY%3D,
                  oauth_timestamp=137131200,
                  oauth_nonce=4572616e48616d6d65724c61686176,
                  oauth_version=1.0

   Then, I thought it might need to go into the WWW-Authenticate
  field
as
   opposed to the Authorization field so I tried that too with no
   success.

   I've also just tried formatting them as GET parameters and
  attaching
   them to the request URL, but that isn't working either.  It would
look
   like:

  http://twitter.com/oauth/request_token?oauth_consumer_key=

  valueoauth_signature_method=HMAC-SHA1oauth_timestamp=1266440918oauth_nonce=1266440928oauth_version=1.0oauth_signature=l%2BYDrTyWGpvDu3owDlVQLakzVns%3D

   On Feb 17, 3:52 pm, Ryan Alford ryanalford...@gmail.com wrote:
Can you post the URL with querys...
On Wed, Feb 17, 2010 at 4:51 PM, Ryan Alford 
ryanalford...@gmail.com
   wrote:

 Why are you doing this?

 StringBuilder params = new StringBuilder();
             ...

 On Wed, Feb 17, 2010 at 2:37 PM, Berto mstbe...@gmail.com
wrote:

 Hey guys,

 I'm w...


[twitter-dev] oauth request token failing

2010-02-17 Thread Berto
Hey guys,

I'm writing a client in java and trying to use oauth to get an access
token.  However, I keep getting an IOException which essentially means
I'm getting an HTTP 401 error back (unauthorized).  I've verified that
my signature algorithm is correct by using some provided examples over
at oauth.net, but nothing seems to be working for me.  Does the
consumer key need an  after it?  I'm using the exact values provided
via the register oauth client page.  Here's a snippet of the code:

HttpURLConnection connection = null;
BufferedReader reader = null;
StringBuilder responseBuilder;
Date date = new Date();
long time = date.getTime();
long timestamp = time / 1000;
Random tmp = new Random();

try {
StringBuilder stuff = new StringBuilder();
stuff.append(encode(oauth_consumer_key));
stuff.append(=);
stuff.append(encode(CONSUMER_KEY));
stuff.append();
stuff.append(encode(oauth_nonce));
stuff.append(=);
stuff.append(encode(Long.toString(timestamp +
tmp.nextInt(1000;
stuff.append();
stuff.append(encode(oauth_signature_method));
stuff.append(=);
stuff.append(encode(HMAC-SHA1));
stuff.append();
stuff.append(encode(oauth_timestamp));
stuff.append(=);
stuff.append(encode(Long.toString(timestamp)));
stuff.append();
stuff.append(encode(oauth_version));
stuff.append(=);
stuff.append(encode(1.0));

StringBuffer base = new
StringBuffer(GET).append()
.append(encode(http://twitter.com/oauth/
request_token)).append();
base.append(encode(stuff.toString()));
String oauthBaseString = base.toString();

String sig = signature(oauthBaseString,
CONSUMER_SECRET);

StringBuilder params = new StringBuilder();
params.append(encode(oauth_consumer_key));
params.append(=\);
params.append(encode(CONSUMER_KEY));
params.append(\, );
params.append(encode(oauth_signature_method));
params.append(=\);
params.append(encode(HMAC-SHA1));
params.append(\, );
params.append(encode(oauth_signature));
params.append(=\);
params.append(encode(sig));
params.append(\, );
params.append(encode(oauth_timestamp));
params.append(=\);
params.append(encode(Long.toString(timestamp)));
params.append(\, );
params.append(encode(oauth_nonce));
params.append(=\);
params.append(encode(Long.toString(timestamp +
tmp.nextInt(1000;
params.append(\, );
params.append(encode(oauth_version));
params.append(=\);
params.append(encode(1.0));
params.append(\);

// Prepare the connection
URL url = new URL(http://twitter.com/oauth/
request_token);
connection = (HttpURLConnection) url.openConnection();
connection.setRequestMethod(GET);

connection.setRequestProperty(WWW-Authenticate,
OAuth  + params.toString());

connection.setConnectTimeout(3);
connection.setReadTimeout(3);

// Read the response
   int code = -1;
try {
code = connection.getResponseCode();
} catch (IOException e) {
   e.printStackTrace();
}
reader = new BufferedReader(new
InputStreamReader(connection.getInputStream()));
responseBuilder = new StringBuilder();

String line = null;
while ((line = reader.readLine()) != null) {
responseBuilder.append(line);
}


[twitter-dev] Re: oauth request token failing

2010-02-17 Thread Berto
To answer the first email, I was doing that so I could put it in the
request header's authorization field to get this effect:

(Taken from oauth.net)
Authorization: OAuth realm=http://sp.example.com/;,
oauth_consumer_key=0685bd9184jfhq22,
oauth_token=ad180jjd733klru7,
oauth_signature_method=HMAC-SHA1,
oauth_signature=wOJIO9A2W5mFwDgiDvZbTSMK%2FPY%3D,
oauth_timestamp=137131200,
oauth_nonce=4572616e48616d6d65724c61686176,
oauth_version=1.0

Then, I thought it might need to go into the WWW-Authenticate field as
opposed to the Authorization field so I tried that too with no
success.

I've also just tried formatting them as GET parameters and attaching
them to the request URL, but that isn't working either.  It would look
like:

http://twitter.com/oauth/request_token?oauth_consumer_key=valueoauth_signature_method=HMAC-SHA1oauth_timestamp=1266440918oauth_nonce=1266440928oauth_version=1.0oauth_signature=l%2BYDrTyWGpvDu3owDlVQLakzVns%3D

On Feb 17, 3:52 pm, Ryan Alford ryanalford...@gmail.com wrote:
 Can you post the URL with querystring parameters when you make the request?

 Ryan

 On Wed, Feb 17, 2010 at 4:51 PM, Ryan Alford ryanalford...@gmail.comwrote:

  Why are you doing this?

  StringBuilder params = new StringBuilder();
                 params.append(encode(oauth_consumer_key));
                 params.append(=\);
                 params.append(encode(CONSUMER_KEY));
                 params.append(\, );
                 params.append(encode(oauth_signature_method));
                 params.append(=\);
                 params.append(encode(HMAC-SHA1));
                 params.append(\, );
                 params.append(encode(oauth_signature));
                 params.append(=\);
                 params.append(encode(sig));
                 params.append(\, );
                 params.append(encode(oauth_timestamp));
                 params.append(=\);
                 params.append(encode(Long.toString(timestamp)));
                 params.append(\, );
                 params.append(encode(oauth_nonce));
                 params.append(=\);
                 params.append(encode(Long.toString(timestamp +
  tmp.nextInt(1000;
                 params.append(\, );
                 params.append(encode(oauth_version));
                 params.append(=\);
                 params.append(encode(1.0));
                 params.append(\);

  Are you putting quotation marks around the values?

  Ryan

  On Wed, Feb 17, 2010 at 2:37 PM, Berto mstbe...@gmail.com wrote:

  Hey guys,

  I'm writing a client in java and trying to use oauth to get an access
  token.  However, I keep getting an IOException which essentially means
  I'm getting an HTTP 401 error back (unauthorized).  I've verified that
  my signature algorithm is correct by using some provided examples over
  at oauth.net, but nothing seems to be working for me.  Does the
  consumer key need an  after it?  I'm using the exact values provided
  via the register oauth client page.  Here's a snippet of the code:

  HttpURLConnection connection = null;
             BufferedReader reader = null;
             StringBuilder responseBuilder;
             Date date = new Date();
             long time = date.getTime();
             long timestamp = time / 1000;
             Random tmp = new Random();

             try {
                 StringBuilder stuff = new StringBuilder();
                 stuff.append(encode(oauth_consumer_key));
                 stuff.append(=);
                 stuff.append(encode(CONSUMER_KEY));
                 stuff.append();
                 stuff.append(encode(oauth_nonce));
                 stuff.append(=);
                 stuff.append(encode(Long.toString(timestamp +
  tmp.nextInt(1000;
                 stuff.append();
                 stuff.append(encode(oauth_signature_method));
                 stuff.append(=);
                 stuff.append(encode(HMAC-SHA1));
                 stuff.append();
                 stuff.append(encode(oauth_timestamp));
                 stuff.append(=);
                 stuff.append(encode(Long.toString(timestamp)));
                 stuff.append();
                 stuff.append(encode(oauth_version));
                 stuff.append(=);
                 stuff.append(encode(1.0));

                 StringBuffer base = new
  StringBuffer(GET).append()
                 .append(encode(http://twitter.com/oauth/
  request_token)).append();
                 base.append(encode(stuff.toString()));
                 String oauthBaseString = base.toString();

                 String sig = signature(oauthBaseString,
  CONSUMER_SECRET);

                 StringBuilder params = new StringBuilder();
                 params.append(encode(oauth_consumer_key));
                 params.append(=\);
                 params.append(encode(CONSUMER_KEY));
                 params.append

[twitter-dev] Re: oauth request token failing

2010-02-17 Thread Berto
Nevermind, just re-read the normalizing parameters part of the spec.
I'll try it out tomorrow.

Thanks.

On Feb 17, 5:27 pm, Ryan Alford ryanalford...@gmail.com wrote:
 Your querystring parameters are in the wrong order.  You have the
 oauth_nonce AFTER oauth_timestamp.  It needs to be before it.  The
 parameters must be in order.

 Ryan

 Sent from my DROID

 On Feb 17, 2010 6:18 PM, Berto mstbe...@gmail.com wrote:

 To answer the first email, I was doing that so I could put it in the
 request header's authorization field to get this effect:

 (Taken from oauth.net)
 Authorization: OAuth realm=http://sp.example.com/;,
                oauth_consumer_key=0685bd9184jfhq22,
                oauth_token=ad180jjd733klru7,
                oauth_signature_method=HMAC-SHA1,
                oauth_signature=wOJIO9A2W5mFwDgiDvZbTSMK%2FPY%3D,
                oauth_timestamp=137131200,
                oauth_nonce=4572616e48616d6d65724c61686176,
                oauth_version=1.0

 Then, I thought it might need to go into the WWW-Authenticate field as
 opposed to the Authorization field so I tried that too with no
 success.

 I've also just tried formatting them as GET parameters and attaching
 them to the request URL, but that isn't working either.  It would look
 like:

 http://twitter.com/oauth/request_token?oauth_consumer_key=
 valueoauth_signature_method=HMAC-SHA1oauth_timestamp=1266440918oauth_nonce=1266440928oauth_version=1.0oauth_signature=l%2BYDrTyWGpvDu3owDlVQLakzVns%3D

 On Feb 17, 3:52 pm, Ryan Alford ryanalford...@gmail.com wrote:

  Can you post the URL with querys...
  On Wed, Feb 17, 2010 at 4:51 PM, Ryan Alford ryanalford...@gmail.com
 wrote:

   Why are you doing this?

   StringBuilder params = new StringBuilder();
               ...
   On Wed, Feb 17, 2010 at 2:37 PM, Berto mstbe...@gmail.com wrote:

   Hey guys,

   I'm w...


Re: [twitter-dev] Re: oauth request token failing

2010-02-17 Thread Berto
I thought that was only for the signature which is in the right
order?

Ryan Alford wrote:
 Your querystring parameters are in the wrong order.  You have the
 oauth_nonce AFTER oauth_timestamp.  It needs to be before it.  The
 parameters must be in order.

 Ryan

 Sent from my DROID

 On Feb 17, 2010 6:18 PM, Berto mstbe...@gmail.com wrote:

 To answer the first email, I was doing that so I could put it in the
 request header's authorization field to get this effect:

 (Taken from oauth.net)
 Authorization: OAuth realm=http://sp.example.com/;,
oauth_consumer_key=0685bd9184jfhq22,
oauth_token=ad180jjd733klru7,
oauth_signature_method=HMAC-SHA1,
oauth_signature=wOJIO9A2W5mFwDgiDvZbTSMK%2FPY%3D,
oauth_timestamp=137131200,
oauth_nonce=4572616e48616d6d65724c61686176,
oauth_version=1.0

 Then, I thought it might need to go into the WWW-Authenticate field as
 opposed to the Authorization field so I tried that too with no
 success.

 I've also just tried formatting them as GET parameters and attaching
 them to the request URL, but that isn't working either.  It would look
 like:

 http://twitter.com/oauth/request_token?oauth_consumer_key=
 valueoauth_signature_method=HMAC-SHA1oauth_timestamp=1266440918oauth_nonce=1266440928oauth_version=1.0oauth_signature=l%2BYDrTyWGpvDu3owDlVQLakzVns%3D


 On Feb 17, 3:52 pm, Ryan Alford ryanalford...@gmail.com wrote:
  Can you post the URL with querys...
  On Wed, Feb 17, 2010 at 4:51 PM, Ryan Alford ryanalford...@gmail.com
 wrote:

 
   Why are you doing this?
 
   StringBuilder params = new StringBuilder();
   ...

   On Wed, Feb 17, 2010 at 2:37 PM, Berto mstbe...@gmail.com wrote:
 
   Hey guys,
 
   I'm w...