I am trying to use the Evernote PHP SDK within my Laravel app to pull in some notes. However, I can't get it to display any results.
It's included in my composer.json
evernote/evernote-cloud-sdk-php": "dev-master"
I have successfully authorised my app and got the token with following code, I am using the sandbox and can see my app is successfully authorised..
$oauthHandler = new \Evernote\Auth\OauthHandler($sandbox, false, $china);
$oauthData = $oauthHandler->authorize($key, $secret, $callback);
return redirect()->to($oauthData);
The in the callback method:
request()->get('oauth_token');
i've created a few test notebooks with some notes inside.
I now want to pull in the notebooks using the following code:
$client = new \Evernote\Client($token, $sandbox);
$notebooks = $client->listNotebooks();
dd($notebooks);
$notebooks
is returning an empty array, no errors, nothing.
Part code is taken from their sample snippets.