/**
  * Sends the actual request to obtain a request token.
  *
  * @param osapiProvider $provider the provider configuration (required to get the oauth endpoints)
  * @return array('http_code' => HTTP response code (200, 404, 401, etc), 'data' => the html document)
  */
 protected function requestRequestToken($callbackUrl)
 {
     $requestTokenRequest = OAuthRequest::from_consumer_and_token($this->consumerToken, NULL, "GET", $this->provider->requestTokenUrl, array());
     if (is_array($this->provider->requestTokenParams)) {
         foreach ($this->provider->requestTokenParams as $key => $value) {
             $requestTokenRequest->set_parameter($key, $value);
         }
     }
     $requestTokenRequest->set_parameter('oauth_callback', $callbackUrl);
     $requestTokenRequest->sign_request($this->signatureMethod, $this->consumerToken, NULL);
     return osapiIO::send($requestTokenRequest, 'GET', $this->provider->httpProvider);
 }
 /**
  * Sends the actual request to obtain a request token.
  *
  * @param osapiProvider $provider the provider configuration (required to get the oauth endpoints)
  * @return array('http_code' => HTTP response code (200, 404, 401, etc), 'data' => the html document)
  */
 protected function requestRequestToken()
 {
     $requestTokenRequest = OAuthRequest::from_consumer_and_token($this->consumerToken, NULL, "GET", $this->provider->requestTokenUrl, array());
     $requestTokenRequest->sign_request($this->signatureMethod, $this->consumerToken, NULL);
     return osapiIO::send($requestTokenRequest, 'GET', $this->provider->httpProvider);
 }