如果源用户或目的用户不存在,将返回http的400错误
对应API:{@link http://open.weibo.com/wiki/2/friendships/show friendships/show}
对应API:{@link http://open.weibo.com/wiki/2/friendships/show friendships/show}
public function getFriendID($myUsername, $name) { $token = getWeiboToken(); if (!$token) { throw new InvalidArgumentException('no token'); } $c = new SaeTClientV2(WB_AKEY, WB_SKEY, $token); $array = $c->is_followed_by_name($myUsername, urldecode($name)); if ($array['target']['followed_by'] or $array['target']['following']) { return $array['source']['id']; } return false; }