-
Add an Evernote package to package directory as a git submodule.
-
Download the Evernote API SDK. And extract it.
-
Make fuel/app/vendor/evernote dir.
-
Copy the PHP SDK lib directory to that evernote vendor directory. (fuel/app/vendor/evernote/lib)
-
Write login action as this code
public function action_login() { $action = \Fuel\Core\Input::get('action'); if ($action === null) { $success = \Evernote\Evernote::getTemporaryCredentials(); if ($success) { \Fuel\Core\Response::redirect(\Evernote\Evernote::getAuthorizationUrl(\Fuel\Core\Session::get('requestToken'))); } } elseif ($action === 'callback') { if (\Evernote\Evernote::handleCallback()) { $credentials = \Evernote\Evernote::getTokenCredentials(); if ($credentials['status'] === 'success') { \Fuel\Core\Session::set('access_token', $credentials['access_token']); \Fuel\Core\Session::set('access_token_secret', $credentials['access_tokenSecret']); \Fuel\Core\Session::set('shard_id', $credentials['shard_id']); \Fuel\Core\Session::set('user_id', $credentials['user_id']); } } \Fuel\Core\Response::redirect('index'); } }
rizumita/fuel-evernote
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
No description, website, or topics provided.
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published