本文整理汇总了PHP中TwitterOAuth::noAuthRequest方法的典型用法代码示例。如果您正苦于以下问题:PHP TwitterOAuth::noAuthRequest方法的具体用法?PHP TwitterOAuth::noAuthRequest怎么用?PHP TwitterOAuth::noAuthRequest使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TwitterOAuth
的用法示例。
在下文中一共展示了TwitterOAuth::noAuthRequest方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: testSearchResults
function testSearchResults()
{
global $THINKTANK_CFG;
$r = array();
$r["id"] = 0;
$r['network_username'] = 'user';
$r['network_user_id'] = 0;
$r['last_status_id'] = 0;
$r['last_page_fetched_replies'] = 0;
$r['last_page_fetched_tweets'] = 0;
$r['total_posts_in_system'] = 0;
$r['total_replies_in_system'] = 0;
$r['total_follows_in_system'] = 0;
$r['total_users_in_system'] = 0;
$r['is_archive_loaded_replies'] = 0;
$r['is_archive_loaded_follows'] = 0;
$r['crawler_last_run'] = '1/1/2007';
$r['earliest_reply_in_system'] = 0;
$r['api_calls_to_leave_unmade_per_minute'] = 5;
$r['avg_replies_per_day'] = 0;
$r['is_public'] = 1;
$r['is_active'] = 1;
$r['network'] = 'twitter';
$i = new Instance($r);
$to = new TwitterOAuth('', '', '', '');
$twitter_data = $to->noAuthRequest('http://search.twitter.com/search.json?q=%40whitehouse&result_type=recent');
$api = new CrawlerTwitterAPIAccessorOAuth('111', '222', $THINKTANK_CFG['oauth_consumer_key'], $THINKTANK_CFG['oauth_consumer_secret'], $i, $THINKTANK_CFG['archive_limit']);
$results = $api->parseJSON($twitter_data);
//print_r($results);
$this->assertEqual($results[0]['post_id'], 11837318124.0);
}