construct TwitterOAuth object
public __construct ( $consumer_key, $consumer_secret, $oauth_token = NULL, $oauth_token_secret = NULL ) |
public function __construct($key, $secret, $callback) { $this->oauth_appId = $key; $this->oauth_appSecret = $secret; parent::__construct($key, $secret); $this->callback = $callback; }
public function __construct($options) { $consumer_key = $options['consumer_key']; $consumer_secret = $options['consumer_secret']; $oauth_token = $options['oauth_token']; $oauth_token_secret = $options['oauth_token_secret']; parent::__construct($consumer_key, $consumer_secret, $oauth_token, $oauth_token_secret); $this->cacheFile = get_stylesheet_directory() . '/core/twitter/twcache.tmp'; }
public function __construct() { $this->consumerKey = \OpenFuego\TWITTER_CONSUMER_KEY; $this->consumerSecret = \OpenFuego\TWITTER_CONSUMER_SECRET; $this->accessToken = \OpenFuego\TWITTER_OAUTH_TOKEN; $this->accessTokenSecret = \OpenFuego\TWITTER_OAUTH_SECRET; try { parent::__construct($this->consumerKey, $this->consumerSecret, $this->accessToken, $this->accessTokenSecret); } catch (\PDOException $e) { Logger::error($e); } }
public function __construct($oauth_token = NULL, $oauth_token_secret = NULL) { // Set the Consumer Key $key = Config::get('social.twitter.app_id'); // Set the Consumer Secret $secret = Config::get('social.twitter.app_secret'); $oauth_token = Config::get('social.twitter.access_token'); $oauth_token_secret = Config::get('social.twitter.access_token_secret'); // Log::info('app key '.$key); // Log::info('app secret '.$secret); // Log::info('client token '.$oauth_token); // Log::info('client token secret '.$oauth_token_secret); parent::__construct($key, $secret, $oauth_token, $oauth_token_secret); }
/** * 1. Twconnect class constructor, // not yet - checks login and puts user information in $this->user array */ public function Twconnect() { $ci =& get_instance(); $ci->config->load('twitter', true); $config = $ci->config->item('twitter'); /* Try to retrieve user access token (permanent) from session */ $access_token = $ci->session->userdata('tw_access_token'); if ($access_token && isset($access_token['oauth_token']) && isset($access_token['oauth_token_secret'])) { // echo 'Create a TwitterOauth object with consumer(app) and user tokens.'; // echo 'It is the last (third) step of Twitter OAuth process'; parent::__construct($config['consumer_key'], $config['consumer_secret'], $access_token['oauth_token'], $access_token['oauth_token_secret']); $this->tw_access_token = $access_token; $this->tw_user_id = isset($access_token['user_id']) ? $access_token['user_id'] : null; $this->tw_user_name = isset($access_token['screen_name']) ? $access_token['screen_name'] : null; /* Try to retrieve request token (temporary) from session */ } else { $request_token = $ci->session->userdata('tw_request_token'); if ($request_token && isset($request_token['oauth_token']) && isset($request_token['oauth_token_secret'])) { // echo 'Create object with request token key/secret sent previously to twitter'; // echo 'It is the second step of Twitter OAuth process'; parent::__construct($config['consumer_key'], $config['consumer_secret'], $request_token['oauth_token'], $request_token['oauth_token_secret']); $this->tw_request_token = $request_token; } else { // echo 'Create object without access or request token'; // echo 'It is the first step of Twitter OAuth process'; parent::__construct($config['consumer_key'], $config['consumer_secret']); } } $this->tw_config = $config; $this->tw_status = $ci->session->userdata('tw_status'); $this->host = 'https://api.twitter.com/1.1/'; // Use API v1.1 }
function __construct($apipath, $consumer_key, $consumer_secret, $oauth_token = NULL, $oauth_token_secret = NULL) { parent::__construct($consumer_key, $consumer_secret, $oauth_token, $oauth_token_secret); $this->host = $apipath; }
public function __construct($oauth_token = null, $oauth_token_secret = null) { $this->_key = config('services.twitter.key'); $this->_secret = config('services.twitter.secret'); parent::__construct($this->_key, $this->_secret, $oauth_token, $oauth_token_secret); }
public function rdconnection($o_token = "", $o_token_secret = "") { $appkey = $this->_ci->config->item('twitter_key'); $appsecret = $this->_ci->config->item('twitter_secret'); return parent::__construct($appkey, $appsecret, $o_token, $o_token_secret); }