/** * Fetch a request token. Sets the token for this object with the fetched token. * * The object should be initialized with the consumer token. * * @return array * An associative array containing the token, secret and callback confirmed status. * Array keys are 'oauth_callback_confirmed', 'oauth_token' and 'oauth_token_secret'. * * @throws CultureFeed_ParseException * If the result could not be parsed. */ public function getRequestToken($callback = '') { $params = array(); if (!empty($callback)) { $params['oauth_callback'] = $callback; } $response = $this->oauth_client->consumerPost('requestToken', $params, FALSE); $token = OAuthUtil::parse_parameters($response); if (!isset($token['oauth_token']) || !isset($token['oauth_token'])) { throw new CultureFeed_ParseException($response, 'token'); } $this->token = new OAuthConsumer($token['oauth_token'], $token['oauth_token_secret']); return $token; }