public function oAuthAccessToken($oauthToken)
{
// build parameters
$parameters = array();
$parameters['oauth_token'] = (string) $oauthToken;
// make the call
$response = $this->doOAuthCall('1/oauth/access_token', $parameters, 'POST', false);
// validate
$json = @json_decode($response, true);
if (isset($json['error'])) {
throw new Exception($json['error']);
}
// process response
$response = (array) explode('&', $response);
$return = array();
// loop chunks
foreach ($response as $chunk) {
// split again
$chunks = explode('=', $chunk, 2);
// store return
if (count($chunks) == 2) {
$return[$chunks[0]] = $chunks[1];
}
}
// return
return $return;
}