Hi Tim,

I'm not familiar with the Drupal OAuth module, but can help you a little

Hopefully that module is a bit flexible in the different approaches you can
use to perform OAuth with it. Essentially, you need to build a "mock
request" that you won't actually execute against an endpoint at Twitter
using your credentials. The canon for OAuth Echo right now is to build a GET
request to http://api.twitter.com/1/account/verify_credentials.json -- but
essentially, you can use any resource you want (and the OAuth Echo proxy
provider could do something with the response in conjunction with your
request -- TwitPic, yFrog, etc. are only just one possibility of the things
you can do with OAuth Echo.

I edited up a good example in simple PHP of using OAuth Echo against TwitPic
the other day: http://pastie.org/pastes/1005387


On Thu, Jun 17, 2010 at 1:40 AM, Tim Millwood <t...@millwoodonline.co.uk>wrote:

> I'm trying to get oAuth Echo working with http://drippic.com
> My API url is http://drippic.com/drippic2/upload if you want to give
> it a try.
> Here is my code.
> $response = drupal_http_request($sp,
> array('HTTP_X_AUTH_SERVICE_PROVIDER'=>$sp,'Authorization'=>
> $auth_cred),'POST');
> watchdog('drippic','</pre>'.print_r($response,true).'</pre>');
> print(json_encode($response));
> I'm not sure what I need to send it, I copied Twitpic's example and
> used this in terminal
> curl -v -H 'X-Auth-Service-Provider:
> https://api.twitter.com/1/account/verify_credentials.json'
> -H 'X-Verify-Credentials-Authorization: OAuth realm="http://
> api.twitter.com/", oauth_consumer_key="GDdmIQH6jhtmLUypg82g",
> oauth_signature_method="HMAC-SHA1", oauth_token="819797-
> Jxq8aYUDRmykzVKrgoLhXSq67TEa5ruc4GJC2rWimw",
> oauth_timestamp="1272325550",
> oauth_nonce="oElnnMTQIZvqvlfXM56aBLAf5noGD0AQR3Fmi7Q6Y",
> oauth_version="1.0", oauth_signature="U1obTfE7Rs9J1kafTGwufLJdspo%3D"'
> http://drippic.com/drippic2/upload
> It returns 401, guess it's because the details are wrong, and not sure
> what I should use.
> Can anyone help?
> (don't really know enough about oAuth, oAuth on the site is all
> managed by the Drupal oAuth module)

Reply via email to