I am trying to get the request token from Dropbox.
Till now I have tried countless libraries, some don't work, some are not maintained, and some simply you don't know what to do. So I think it'll be easier for me to make my own functions by using OAuth and PHP.
I have collected some knowledge from a few places and created this:
<?php
$consumer = new OAuth("Key", "Secret", OAUTH_SIG_METHOD_HMACSHA1, OAUTH_AUTH_TYPE_FORM);
$consumer->fetch('https://api.dropbox.com/1/oauth/request_token', null, OAUTH_HTTP_METHOD_POST);
?>
And it seems to work.
Now my questions are:
- I want to know how do I get the stuff they have sent in return, i.e. the Request Token?
- And will I be able to use this method for other things too, like getting Access Tokens and more?
Note: I'm on Ubuntu 12.04 with the OAuth PHP5 Library installed using PECL.