src/GuzzleOauth/BaseConsumerOauth1.php
public function getRequestToken($callback_uri = NULL) {

    // set callback_uri
    $this->getOauthPlugin()->setCallbackUri($callback_uri);

    //Get request token
    $response = $this->get($this->getConfig('request_token_path'))->send();
    $request_token = array();
    parse_str($response->getBody(), $request_token);

    // Throw exception if the callback isn't confirmed
    if (!isset($request_token['oauth_callback_confirmed']) || !in_array($request_token['oauth_callback_confirmed'], array(true, "true"))) {
      throw new \Exception("There was an error regarding the callback confirmation");
    }

    // Return RequestToken
    return $request_token;
  }
public function getRequestToken($callback_uri = NULL) {

    // set callback_uri
    $this->getOauthPlugin()->setCallbackUri($callback_uri);

    //Get request token
    $response = $this->get($this->getConfig('request_token_path'))->send();
    $request_token = array();
    parse_str($response->getBody(), $request_token);

    // Throw exception if the callback isn't confirmed
    if (!isset($request_token['oauth_callback_confirmed']) || !in_array($request_token['oauth_callback_confirmed'], array(true, "true"))) {
      throw new \Exception("There was an error regarding the callback confirmation");
    }

    // Return RequestToken
    return $request_token;
  }
public function getRequestToken ( $ callback_uri = NULL ) { // set callback_uri $ this -> getOauthPlugin ( ) -> setCallbackUri ( $ callback_uri ) ; //Get request token $ response = $ this -> get ( $ this -> getConfig ( 'request_token_path' ) ) -> send ( ) ; $ request_token = array ( ) ; parse_str ( $ response -> getBody ( ) , $ request_token ) ; // Throw exception if the callback isn't confirmed if ( ! isset ( $ request_token [ 'oauth_callback_confirmed' ] ) || ! in_array ( $ request_token [ 'oauth_callback_confirmed' ] , array ( true , "true" ) ) ) { throw new \ Exception ( "There was an error regarding the callback confirmation" ) ; } // Return RequestToken return $ request_token ; }
Get a Request Token.
Get a Request Token .