public_timeline() 공개 메소드

对应API:{@link http://open.weibo.com/wiki/2/statuses/public_timeline statuses/public_timeline}
public public_timeline ( integer $page = 1, integer $count = 50, integer $base_app ) : array
$page integer 返回结果的页码,默认为1。
$count integer 单页返回的记录条数,默认为50。
$base_app integer 是否只获取当前应用的数据。0为否(所有数据),1为是(仅当前应用),默认为0。
리턴 array
예제 #1
0
 public function actionAdminFetchStatus()
 {
     if ($this->getRole() != 2) {
         return;
     }
     $adminUid = Yii::app()->params['adminWeiboUid'];
     $adminUser = User::model()->findByAttributes(array('sns_uid' => $adminUid));
     $access_token = $adminUser->access_token;
     $c = new SaeTClientV2(WB_AKEY, WB_SKEY, $access_token);
     $contents = $c->public_timeline();
     if (isset($contents['error_code'])) {
         $o = new SaeTOAuthV2(WB_AKEY, WB_SKEY);
         $weiboUrl = $o->getAuthorizeURL(WB_CALLBACK_URL);
         $this->render('weibologin', array('weiboUrl' => $weiboUrl));
     } else {
     }
 }