Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
26 lines (17 sloc) 610 Bytes
<?php
require_once '../vendor/autoload.php';
$provider = new \Poposki\Goodreads\Provider([
'identifier' => 'your-application-key',
'secret' => 'your-application-secret',
'oauth_token' => 'user-oauth-token',
'oauth_token_secret' => 'user-oauth-token-secret',
]);
try {
// Get id of user who authorized OAuth
$user = $provider->getUserId();
// Get info about an author by id
$author = $provider->getAuthorById(7160538);
} catch (\Exception $e) {
// Failed to get the token credentials.
exit($e->getMessage());
}
You can’t perform that action at this time.