Abraham\TwitterOAuth\TwitterOAuth::url PHP Method

url() public method

Make URLs for user browser navigation.
public url ( string $path, array $parameters ) : string
$path string
$parameters array
return string
    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);
    }

Usage Example

 /**
  * 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;
 }
All Usage Examples Of Abraham\TwitterOAuth\TwitterOAuth::url