PHP code example of evernote / yinxiang
1. Go to this page and download the library: Download evernote/yinxiang library . Choose the download type require .
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
evernote / yinxiang example snippets
$client = new Evernote\Client(array(
'consumerKey' => 'YOUR CONSUMER KEY',
'consumerSecret' => 'YOUR CONSUMER SECRET'
));
$requestToken = $client->getRequestToken('YOUR CALLBACK URL');
$authorizeUrl = $client->getAuthorizeUrl($requestToken['oauth_token']);
=> https://sandbox.evernote.com/OAuth.action?oauth_token=OAUTH_TOKEN
$accessToken = $client->getAccessToken(
$requestToken['oauth_token'],
$requestToken['oauth_token_secret'],
$_GET['oauth_verifier']
);
$token = $accessToken['oauth_token'];
$client = new Evernote\Client(array('token' => $token));
$noteStore = $client->getNoteStore();
$notebooks = $noteStore->listNotebooks();
$client = new Evernote\Client(array('token' => $token));
$userStore = $client->getUserStore();
$userStore->getUser();
$noteStore = $client->getNoteStore();
$noteStore->listNotebooks();
$linkedNotebooks = $noteStore->listLinkedNotebooks;
$linkedNotebook = $linkedNotebooks[0];
$sharedNoteStore = $client->sharedNoteStore($linkedNotebook);
$sharedNotebook = $sharedNoteStore->getSharedNotebookByAuth();
$sharedNoteStore->listTagsByNotebook($sharedNotebook->notebookGuid);
$businessNoteStore = $client->getBusinessNoteStore();
$businessNoteStore->listNotebooks();