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?