__construct() 공개 메소드

Creates object using consumer and access keys.
public __construct ( $consumerKey, $consumerSecret, $accessToken = NULL, $accessTokenSecret = NULL )
예제 #1
0
 public function __construct($config)
 {
     parent::setVariables($config);
     $this->callback_getdata = array(array($this, 'oauthRequest'), array('search', array('q' => $config['terms'], 'rpp' => $config['total'], 'result_type' => 'recent'), "http://search.twitter.com/"));
     $this->setURL('http://search.twitter.com/' . $config['terms'] . '/' . $config['total']);
     $this->setItemTemplate('<li class="clearfix"><span class="image"><a href="{{{user_link}}}"><img width="48" src="{{{user_image}}}" alt="{{{user_nickname}}}" /></a></span>{{{text}}}<p class="date"><a href="{{{link}}}">{{{date}}}</a></p></li>' . "\n");
     $this->setURLTemplate('http://search.twitter.com/search?q=' . $config['terms']);
     parent::__construct($config);
 }
예제 #2
0
파일: Twitter.php 프로젝트: pcdinh/pubwich
 public function __construct($config)
 {
     parent::setVariables($config);
     $this->setURL(sprintf('http://' . $this->auth . 'search.twitter.com/search.json?q=%s&rpp=%d', $config['terms'], $config['total']));
     $this->setItemTemplate('<li class="clearfix"><span class="image"><a href="{%user_link%}"><img width="48" src="{%user_image%}" alt="{%user_nickname%}" /></a></span>{%text%}<p class="date"><a href="{%link%}">{%date%}</a></p></li>' . "\n");
     $this->setURLTemplate('http://search.twitter.com/search?q=' . $config['terms']);
     $this->callback_function = array(Pubwich, 'json_decode');
     parent::__construct($config);
 }
예제 #3
0
파일: twitterlib.php 프로젝트: iplayfast/sc
 public function __construct()
 {
     $ci =& get_instance();
     $ci->load->config('twitter', TRUE);
     $consumerKey = $ci->config->item('consumer_key', 'twitter');
     $consumerSec = $ci->config->item('consumer_secret', 'twitter');
     $accesstok = $ci->config->item('access_token', 'twitter');
     $accesstoksec = $ci->config->item('access_token_secret', 'twitter');
     parent::__construct($consumerKey, $consumerSec, $accesstok, $accesstoksec);
 }
예제 #4
0
파일: Twitter.php 프로젝트: j15e/pubwich
 public function __construct($config)
 {
     parent::setVariables($config);
     $this->setURL(sprintf('http://' . $this->auth . 'search.twitter.com/search.json?q=%s&rpp=%d', $config['terms'], $config['total']));
     $this->setItemTemplate('<li class="clearfix"><span class="image"><a href="{%user_link%}"><img width="48" src="{%user_image%}" alt="{%user_nickname%}" /></a></span>{%text%}<p class="date"><a href="{%link%}">{%date%}</a></p></li>' . "\n");
     $this->setURLTemplate('http://search.twitter.com/search?q=' . $config['terms']);
     if (!function_exists('json_decode')) {
         // only include the zend_json library if php json support is not enabled (php < 5.2)
         require_once dirname(__FILE__) . '/../Zend/Json.php';
     }
     $this->callback_function = array(Pubwich, 'json_decode');
     parent::__construct($config);
 }
예제 #5
0
 public function __construct(array $config, $code, $response)
 {
     parent::__construct($config);
     $this->tmhoauth = new Stub_tmhOuth($config, $code);
     $this->tmhoauth->response['response'] = $response;
 }
예제 #6
0
 /**
  * Constructor; sets up configuration.
  * 
  * @param string $user Laconica user name; null for limited read-only access
  * @param string $pass Laconica password; null for limited read-only access
  * @param string $baseUrl Base URL of Laconica install. Defaults to identi.ca
  */
 public function __construct($user = null, $pass = null, $baseUrl = 'http://identi.ca/')
 {
     $this->baseUrl = $baseUrl;
     parent::__construct($user, $pass);
 }
예제 #7
0
 /**
  * Setup Twitter client connection details
  *
  * Ensure you set a user agent, whether via the constructor or by assigning a value to the property directly.
  * Also, if you are not running this from the Eastern timezone, be sure to set your proper timezone.
  *
  * @access public
  * @since 2.0
  * @return Twitter_Friends
  */
 public function __construct($username = null, $password = null, $user_agent = null, $headers = null, $timezone = 'America/New_York')
 {
     parent::__construct($username, $password, $user_agent, $headers, $timezone);
 }
예제 #8
0
 public function __construct($config)
 {
     parent::setVariables($config);
     $this->callback_getdata = array(array($this, 'oauthRequest'), array('search/tweets', array('q' => $config['terms'], 'count' => $config['total'], 'result_type' => 'recent')));
     $this->setURL('http://search.twitter.com/' . $config['terms'] . '/' . $config['total']);
     // for cache hash
     $this->setItemTemplate('<li><a href="{{{user_link}}}"><img class="item-media-thumbnail" width="48" height="48" src="{{{user_image}}}" alt="" /> <strong>@{{{user_nickname}}}</strong></a>: {{{status}}} (<a href="{{{link}}}">{{{date}}}</a>)</li>' . PHP_EOL);
     $this->setURLTemplate('http://search.twitter.com/search?q=' . $config['terms']);
     parent::__construct($config);
 }
예제 #9
0
 /**
  * Constructor
  *
  * @access	public
  */
 function Twitter()
 {
     // Adding an old-style constructor allows use on older installs of EE2.
     Twitter::__construct();
 }