|
Jason - 2012-10-10 15:15:38
What about Dropbox?
Manuel Lemos - 2012-10-10 20:54:46 - In reply to message 1 from Jason
Sure, Dropbox uses OAuth 1, it should be easy to support directly. If you do not do it yourself, I can add support to it soon.
Manuel Lemos - 2012-10-31 12:21:25 - In reply to message 1 from Jason
I just added support to Dropbox. It supports OAuth 1 only. It is a bit odd because OAuth 1 is insecure. Anyway, it is working and you may try it now.
Ravi Kumar - 2014-01-02 14:57:09 - In reply to message 3 from Manuel Lemos
Hi Manuel,
First of all thanks for this class. (*****)
Now I am trying to create folder
$success = $client->CallAPI(
'https://api.dropbox.com/1/fileops/create_folder',
'POST', array( 'root' => 'dropbox', 'path' => 'testing' ) , array('FailOnAccessError'=>true), $temp );
which produces this error
Error: it was not possible to access the API call: it was returned an unexpected response status 403 Response: {"error": "Parameter not found: oauth_token"}
so I added this
'oauth_token' => 'xxxxxxxx', (actual code)
which again
Error: it was not possible to access the API call: it was returned an unexpected response status 403 Response: {"error": "Parameter not found: oauth_consumer_key"}
so I added this
'oauth_consumer_key' => 'xxxxxxxx' (actual client_id code)
and then finally
Error: it was not possible to access the API call: it was returned an unexpected response status 401 Response: {"error": "Unauthorized"}
Now I have no clue what to do? Please give your feedback.
Manuel Lemos - 2014-01-02 19:44:42 - In reply to message 4 from Ravi Kumar
This suggests that you have not gone through the authorization process. This means that you seem to be calling CallAPI without calling Initialize and the Process function first. Please do as in the example.
Ravi Kumar - 2014-01-03 08:35:05 - In reply to message 5 from Manuel Lemos
Hi Manual,
Here is the code I used,
what am I missing here? please enlighten me. or if possible please provide some example.
if(($success = $client->Initialize()))
{
if(($success = $client->Process()))
{
if(strlen($client->access_token))
{
/*/
$success = $client->CallAPI(
'https://api.dropbox.com/1/account/info',
'GET', array(), array('FailOnAccessError'=>true), $user); //*/
$success = $client->CallAPI(
'https://api.dropbox.com/1/fileops/create_folder',
'POST', array( 'root' => 'dropbox',
'path' => 'app/weinent/testing',
'oauth_token' => 'xxxxxx',
'oauth_consumer_key' => 'xxxxxx' ), array('FailOnAccessError'=>true), $user );
}
}
$success = $client->Finalize($success);
}
Manuel Lemos - 2014-01-03 09:08:47 - In reply to message 6 from Ravi Kumar
You should not be passing oauth_token and oauth_consumer_key values as parameters to CallAPI because it confuses the server. That is the role of that function.
Ravi Kumar - 2014-01-04 05:10:21 - In reply to message 7 from Manuel Lemos
ok, I'll try and thanks, nice work btw! :)
Alexander Goncharov - 2014-01-26 16:21:18 - In reply to message 1 from Jason
Hello Manuel!
I `d like to say it is really cool library. :)
You support a very large range of the social networks.
How about VK (http://vk.com/) It is a like facebook but more popular
in Russian speaking community
With the best regards.
Manuel Lemos - 2014-01-27 10:13:38 - In reply to message 9 from Alexander Goncharov
I have already tried to do it in the past but for some reason I could not create an application to test it.
I just added support to VK in the latest version.
|