public function url($path, array $parameters) { $this->resetLastResponse(); $this->response->setApiPath($path); $query = http_build_query($parameters); return sprintf('%s/%s?%s', self::API_HOST, $path, $query); }
/** * Redirects the user to Twitter's API login page. * * @see https://dev.twitter.com/web/sign-in/implementing * @see https://twitteroauth.com/redirect.php */ public function login() { $aRequestToken = $this->getRequestToken(); if ($aRequestToken) { $sTwitterLoginUrl = $this->_oTwitterOAth->url('oauth/authorize', ['oauth_token' => $aRequestToken['oauth_token']]); URL::redirect($sTwitterLoginUrl); } return false; }