TwitterOAuth::__construct PHP Method

__construct() public method

construct TwitterOAuth object
public __construct ( $consumer_key, $consumer_secret, $oauth_token = NULL, $oauth_token_secret = NULL )
    function __construct($consumer_key, $consumer_secret, $oauth_token = NULL, $oauth_token_secret = NULL)
    {
        $this->sha1_method = new OAuthSignatureMethod_HMAC_SHA1();
        $this->consumer = new OAuthConsumer($consumer_key, $consumer_secret);
        if (!empty($oauth_token) && !empty($oauth_token_secret)) {
            $this->token = new OAuthConsumer($oauth_token, $oauth_token_secret);
        } else {
            $this->token = NULL;
        }
    }

Usage Example

Exemplo n.º 1
0
 public function __construct($key, $secret, $callback)
 {
     $this->oauth_appId = $key;
     $this->oauth_appSecret = $secret;
     parent::__construct($key, $secret);
     $this->callback = $callback;
 }
All Usage Examples Of TwitterOAuth::__construct