public function actionGetCounts() { $request = Yii::app()->getRequest(); $id = $request->getParam('id'); $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); $counts = $c->show_counts($id); if (isset($counts['error_code'])) { return $this->responseError("sina api error"); } return $this->responseJSON($counts, 'success'); }