It's loosely based on the functionality of the SimpleOAuth class, which comes in the recommended php developer kit.
Author: Michael Calcinai
Beispiel #1
0
 /**
  * @param string|null $oAuthToken
  * @return string
  */
 public function getAuthorizeURL($oAuthToken = null)
 {
     $authorizeUrl = $this->oauth_client->getAuthorizeURL();
     if ($oAuthToken) {
         return sprintf('%s?oauth_token=%s', $authorizeUrl, $oAuthToken);
     }
     return $authorizeUrl;
 }
Beispiel #2
0
 /**
  * @param string|null $oauth_token
  * @return string
  */
 public function getAuthorizeURL($oauth_token = null)
 {
     $authorize_url = $this->oauth_client->getAuthorizeURL();
     if ($oauth_token !== null) {
         $operator = parse_url($authorize_url, PHP_URL_QUERY) !== null ? '&' : '?';
         $authorize_url .= sprintf('%soauth_token=%s', $operator, $oauth_token);
     }
     return $authorize_url;
 }