cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Update: Find information on Dropbox support during COVID-19 here
Close

Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted

Dropbox PHP API error

New member | Level 1
New member | Level 1

i've been developing a music website that plays .mp3 files from a Public dropbox folder, and i think i've found a solution on how to get file names from a directory in Dropbox.The code i've found is:

$consumerKey = 'key';
$consumerSecret = 'key';

require_once "dropbox-sdk/Dropbox/autoload.php";

session_start();
$oauth = new Dropbox_OAuth_PHP($consumerKey, $consumerSecret);

$dropbox = new Dropbox_API($oauth);

$info = $dropbox->getMetaData('Public', true);
print_r($info['contents']);

The autoload.php is in the right directory, all necessary files are present.But the error I get is:

Fatal error: Class 'Dropbox_OAuth_PHP' not found in       C:\wamp\www\api\index.php on line 10

Is there something I'm doing wrong?

2 Replies 2
Highlighted

Re: Dropbox PHP API error

Dropboxer
Dropboxer

[Cross-linking with StackOverflow where it seems you've already sorted this out: https://stackoverflow.com/questions/28540950/dropbox-php-api-error ]

Highlighted

Re: Dropbox PHP API error

New member | Level 1
New member | Level 1

Yes, I have.The problem was that I was using an outdated piece of code.

Polls
Do you know how to organize your files and folders?
We have created a guide on folder best practice, so you can get organized now check it out here.

Work Smarter with Dropbox

The way we work is changing. Share and discover new ways to work smarter with Dropbox in our community.

Sound good? Let's get started.
Who's talking

Top contributors to this post

What do Dropbox user levels mean?
Need more support?