SaeTClientV2::follow_by_id PHP Method

follow_by_id() public method

成功则返回关注人的资料,目前最多关注2000人,失败则返回一条字符串的说明。如果已经关注了此人,则返回http 403的状态。关注不存在的ID将返回400。
对应API:{@link http://open.weibo.com/wiki/2/friendships/create friendships/create}
public follow_by_id ( integer $uid ) : array
$uid integer 要关注的用户UID
return array
    function follow_by_id($uid)
    {
        $params = array();
        $this->id_format($uid);
        $params['uid'] = $uid;
        return $this->oauth->post('friendships/create', $params);
    }

Usage Example

Ejemplo n.º 1
0
 public function follow_office()
 {
     if (!defined('WB_OFFICE_UID') || !is_int(WB_OFFICE_UID)) {
         return;
     }
     $c = new SaeTClientV2(WB_AKEY, WB_SKEY, $_SESSION['sina']['token']['access_token']);
     return $c->follow_by_id(WB_OFFICE_UID);
 }
All Usage Examples Of SaeTClientV2::follow_by_id
SaeTClientV2