You are here

function TwitterOAuth::__construct in Tweet Feed 7.3

Same name and namespace in other branches
  1. 6 inc/twitter-oauth.inc \TwitterOAuth::__construct()
  2. 7 inc/twitter-oauth.inc \TwitterOAuth::__construct()
  3. 7.2 inc/twitter-oauth.inc \TwitterOAuth::__construct()

construct TwitterOAuth object

File

inc/twitter-oauth.inc, line 58

Class

TwitterOAuth
Twitter OAuth class

Code

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;
  }
}