pinterest-api-php
pinterest-api-php copied to clipboard
getting error message "API method not found"
Using this code (using my App id and App secret key and CALLBACK_URL)
$pinterest = new \DirkGroenen\Pinterest\Pinterest(CLIENT_ID, CLIENT_SECRET);
if (isset($_GET["code"])) {
$token = $pinterest->auth->getOAuthToken($_GET["code"]);
$pinterest->auth->setOAuthToken($token->access_token);
} else {
$loginurl = $pinterest->auth->getLoginUrl(CALLBACK_URL, ['user_accounts:read,boards:read']);
echo '<a href=' . $loginurl . '>Authorize Pinterest</a>';
$me = $pinterest->users->me();
echo $me;
}
but after click on "Authorize Pinterest" link getting error message- {"code":11,"data":null,"message":"API method not found.","endpoint_name":null,"status":"failure"}