views:

412

answers:

1

I am currently stuck trying to make requests to a service's api using a 2 legged oAuth request using PHP.

I am using the PHP library found here: http://code.google.com/p/oauth-php/ and there seems to be absolutely no documentation anywhere online for using this library for a 2 legged request.

So currently from the service I have the following details:

  • $consumer_key - needs to be an empty string
  • $consumer_secret - needs to be an empty string
  • $access_token - my login name
  • $access_token_secret - your generated application token

And I want to be able to make a request to:

http://foo.com/api/test/whoami

To test that the authentication is working correctly so I can use the rest of the api.

Anybody got any pointers on how to use that php library to achieve this? or are there better methods for a simple 2 legged call like this?

Help!? :)