Updated getOauthToken
zigstum opened this issue · comments
zigstum commented
Pinterest have finally decided on the oauth access token behaviour - the only thing that needs adding to the getOauthToken function in PinterestOauth.php is "timesatmp" => time(),
:
public function getOAuthToken($code)
{
// Build data array
$data = array(
"grant_type" => "authorization_code",
"client_id" => $this->client_id,
"client_secret" => $this->client_secret,
"timestamp" => time(),
"code" => $code
);
// Perform post request
$response = $this->request->post("oauth/token", $data);
return $response;
}
Dirk Groenen commented
I can't seem to find any of this in their docs. Can you share your source?