/** * Save token */ protected function _saveToken() { if (self::REQUEST_INITIATE == $this->_requestType) { if (self::CALLBACK_ESTABLISHED == $this->_protocolParams['oauth_callback'] && $this->_consumer->getCallBackUrl()) { $callbackUrl = $this->_consumer->getCallBackUrl(); } else { $callbackUrl = $this->_protocolParams['oauth_callback']; } $this->_token->createRequestToken($this->_consumer->getId(), $callbackUrl); } elseif (self::REQUEST_TOKEN == $this->_requestType) { $this->_token->convertToAccess(); } }