public function Twitter::__construct in Twitter 7.5
Same name and namespace in other branches
- 6.5 twitter.lib.php \Twitter::__construct()
- 6.3 twitter.lib.php \Twitter::__construct()
- 7.6 twitter.lib.php \Twitter::__construct()
- 7.3 twitter.lib.php \Twitter::__construct()
Constructor for the Twitter class
File
- ./
twitter.lib.php, line 38 - Integration layer to communicate with the Twitter REST API 1.1. https://dev.twitter.com/docs/api/1.1
Class
- Primary Twitter API implementation class
Code
public function __construct($consumer_key, $consumer_secret, $oauth_token = NULL, $oauth_token_secret = NULL) {
$this->signature_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);
}
}