unfollow_by_id() public method

取消关注某用户。成功则返回被取消关注人的资料,失败则返回一条字符串的说明。
对应API:{@link http://open.weibo.com/wiki/2/friendships/destroy friendships/destroy}
public unfollow_by_id ( integer $uid ) : array
$uid integer 要取消关注的用户UID
return array
Ejemplo n.º 1
0
<?php

session_start();
/* unfollow.php
 * 测试页面
 */
include_once "../config.php";
include_once $webRoot . "lib/saetv2.ex.class.php";
include_once $webRoot . "foundation/debug.php";
$c = new SaeTClientV2(WB_AKEY, WB_SKEY, $_SESSION['stoken']);
if (isset($_GET['id'])) {
    $res = $c->unfollow_by_id($_GET['id']);
    if_weiboapi_fail($res);
    header("Location:" . $siteRoot . "task.php");
    exit;
}