I make the authentication step and got the accesstoken as well.
now I want to start an API call so I wrote the below code:
# Include the Dropbox SDK libraries
require_once "dropbox-sdk/Dropbox/autoload.php";
use \Dropbox as dbx;
$accessToken="XXXXXXXXXXXXXXXXXXXXXXX";
echo "Step 1 <br>";
$dbxClient = new dbx\Client($accessToken, "updashboard-test");
echo "Step 2 <br>".var_dump($dbxClient);
$accountInfo = $dbxClient->getAccountInfo();
echo "Step 3 <br>";
var_dump($accountInfo);
it passed Step 1 and 2 but stoped on step 3 and notting desplayed. plese see the below my screen shot:
Step 1
object(Dropbox\Client)#2 (6) { ["accessToken":"Dropbox\Client":private]=> string(64) "XXXXX" ["clientIdentifier":"Dropbox\Client":private]=> string(16) "updashboard-test" ["userLocale":"Dropbox\Client":private]=> NULL ["apiHost":"Dropbox\Client":private]=> string(15) "api.dropbox.com" ["contentHost":"Dropbox\Client":private]=> string(23) "api-content.dropbox.com" ["host"]=> object(Dropbox\Host)#3 (3) { ["api":"Dropbox\Host":private]=> string(15) "api.dropbox.com" ["content":"Dropbox\Host":private]=> string(23) "api-content.dropbox.com" ["web":"Dropbox\Host":private]=> string(15) "www.dropbox.com" } }
Step 2
I canged AccessToken to XXXX on the above codes.
please let me know why it is like this.