public function getAuthorizeUrl(array $params = [])
    {
        $result = $this->OAuthRequest(self::API_BASE . self::REQUEST_PATH, $params);

        if ($result->getCode() == 200) {
            $tokens = $this->parseResponse($result->getResponse());

            return [
                'auth_url' => self::API_BASE . $this->auth_method . '?oauth_token=' . $tokens['oauth_token'],
                'secret'   => $tokens['oauth_token_secret'],
                'token'    => $tokens['oauth_token']
            ];

        }

        return $this->handleError($result);
    }
public function getAuthorizeUrl(array $params = [])
    {
        $result = $this->OAuthRequest(self::API_BASE . self::REQUEST_PATH, $params);

        if ($result->getCode() == 200) {
            $tokens = $this->parseResponse($result->getResponse());

            return [
                'auth_url' => self::API_BASE . $this->auth_method . '?oauth_token=' . $tokens['oauth_token'],
                'secret'   => $tokens['oauth_token_secret'],
                'token'    => $tokens['oauth_token']
            ];

        }

        return $this->handleError($result);
    }
public function getAuthorizeUrl ( array $ params = [ ] ) { $ result = $ this -> OAuthRequest ( self :: API_BASE . self :: REQUEST_PATH , $ params ) ; if ( $ result -> getCode ( ) == 200 ) { $ tokens = $ this -> parseResponse ( $ result -> getResponse ( ) ) ; return [ 'auth_url' => self :: API_BASE . $ this -> auth_method . '?oauth_token=' . $ tokens [ 'oauth_token' ] , 'secret' => $ tokens [ 'oauth_token_secret' ] , 'token' => $ tokens [ 'oauth_token' ] ] ; } return $ this -> handleError ( $ result ) ; }
Gets the authorization url.

@param array $params Custom parameters passed to the OAuth request
@return array If successful, returns an array with 'auth_url', 'secret' and 'token';
otherwise, returns an array with error code and message.
Gets the authorization url .