本文整理匯總了PHP中Twitter::__construct方法的典型用法代碼示例。如果您正苦於以下問題:PHP Twitter::__construct方法的具體用法?PHP Twitter::__construct怎麽用?PHP Twitter::__construct使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Twitter
的用法示例。
在下文中一共展示了Twitter::__construct方法的9個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: __construct
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: __construct
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: __construct
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: __construct
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: __construct
public function __construct(array $config, $code, $response)
{
parent::__construct($config);
$this->tmhoauth = new Stub_tmhOuth($config, $code);
$this->tmhoauth->response['response'] = $response;
}
示例6: __construct
/**
* 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: __construct
/**
* 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: __construct
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: Twitter
/**
* Constructor
*
* @access public
*/
function Twitter()
{
// Adding an old-style constructor allows use on older installs of EE2.
Twitter::__construct();
}