[twitter-dev] Re: Uploading photo w\ OAuth echo

2010-08-01 Thread Bondi
Thanks Tom !

So that is what I thought - but I still can't upload the photo's.
I've been trying mainly with twitPic and getting 401.
I have been reading posts and discussion and I think I have it all
right.
My thought is that maybe it's a matter of encoding the header.
Should I encode the whole header ? Just the values of the twitPic
header ? Or maybe just the values for the verify credentials header ?

Help would be much obliged :-)
Roi.

On Jul 31, 3:37 am, Tom allerleiga...@gmail.com wrote:
 Basically what you do in an echo is make an oAuth request to the
 verify_credentials.json page, but you don't do the actual request -
 instead, you take the Authorization: header and send it to Twitpic.

 So, no, you don't add anything else than you would have for a normal
 call to verify_credentials.

 Tom

 On Jul 29, 3:21 pm, Bondi roibo...@gmail.com wrote:

  Hi.

  I also keep getting 401 from Twitpic.

  Just to make sure - do we need to add the realm to the signature
  calculation ? Or only to the header ?

  Thanks for the help,
  Roi.


[twitter-dev] Re: Uploading photo w\ OAuth echo

2010-08-01 Thread Tom
The oAuth echo header is usable for any service around, because it
does not need anything specific to the service you use.

Forget about twitpic and any service you want to use at first, because
that's the second step. First, start by creating the authorization
header for the verify_credentials.json page. If you want to check
whether the request actually works, just make the actual request to
the verify_credentials.json page - it shouldn't give a 401 error.

If you have got the proper Authorization header, then go to step 2:
don't make the request to twitter, but send *exactly the same* header
to TwitPic - just not as an Authorization header but as the oAuth
header they want.

What TwitPic does with this header is simply: instead of you making
the request to Twitter, they do it. Because you have signed the
request with the information you need, TwitPic can simply execute the
request. If you send a wrong header, then TwitPic will *get* the 401
error and simply return it to you.

If you don't like text, here's a simple data scheme:
normal: client - twitter
with echo: client - twitpic - twitter

Tom


On Aug 1, 8:40 am, Bondi roibo...@gmail.com wrote:
 Thanks Tom !

 So that is what I thought - but I still can't upload the photo's.
 I've been trying mainly with twitPic and getting 401.
 I have been reading posts and discussion and I think I have it all
 right.
 My thought is that maybe it's a matter of encoding the header.
 Should I encode the whole header ? Just the values of the twitPic
 header ? Or maybe just the values for the verify credentials header ?

 Help would be much obliged :-)
 Roi.

 On Jul 31, 3:37 am, Tom allerleiga...@gmail.com wrote:

  Basically what you do in an echo is make an oAuth request to the
  verify_credentials.json page, but you don't do the actual request -
  instead, you take the Authorization: header and send it to Twitpic.

  So, no, you don't add anything else than you would have for a normal
  call to verify_credentials.

  Tom

  On Jul 29, 3:21 pm, Bondi roibo...@gmail.com wrote:

   Hi.

   I also keep getting 401 from Twitpic.

   Just to make sure - do we need to add the realm to the signature
   calculation ? Or only to the header ?

   Thanks for the help,
   Roi.


[twitter-dev] Re: Uploading photo w\ OAuth echo

2010-07-30 Thread Tom
Basically what you do in an echo is make an oAuth request to the
verify_credentials.json page, but you don't do the actual request -
instead, you take the Authorization: header and send it to Twitpic.

So, no, you don't add anything else than you would have for a normal
call to verify_credentials.

Tom


On Jul 29, 3:21 pm, Bondi roibo...@gmail.com wrote:
 Hi.

 I also keep getting 401 from Twitpic.

 Just to make sure - do we need to add the realm to the signature
 calculation ? Or only to the header ?

 Thanks for the help,
 Roi.