You are here

function TwittersOAuth::__construct in jQuery social stream 7

Same name and namespace in other branches
  1. 7.2 jquery_social_stream.js.inc \TwittersOAuth::__construct()

construct TwittersOAuth object

File

./jquery_social_stream.js.inc, line 137
JS callbacks.

Class

TwittersOAuth
Twitter sOAuth class

Code

function __construct($consumer_key, $consumer_secret, $oauth_token = NULL, $oauth_token_secret = NULL) {
  $this->sha1_method = new sOAuthSignatureMethod_HMAC_SHA1();
  $this->consumer = new sOAuthConsumer($consumer_key, $consumer_secret);
  if (!empty($oauth_token) && !empty($oauth_token_secret)) {
    $this->token = new sOAuthConsumer($oauth_token, $oauth_token_secret);
  }
  else {
    $this->token = NULL;
  }
}