Skip to content

Latest commit

 

History

History
80 lines (61 loc) · 1.59 KB

10_USER.md

File metadata and controls

80 lines (61 loc) · 1.59 KB

获取用户列表

function testUserGet()
{
    global $access_token;

    $user = User::getInstance();
    $ret = $user->setAccessToken($access_token)->get();
    var_dump($ret);
}

获取用户基本信息

function testUserInfo()
 {
     global $access_token;
 
     $user = User::getInstance();
     $ret = $user->setAccessToken($access_token)->info('oYRmUuEetrbelAbvEGIIREm_IoNg');
     var_dump($ret);
 }

批量获取用户基本信息

function testUserInfoBatchget()
{
    global $access_token;

    $user = User::getInstance();
    $ret = $user->setAccessToken($access_token)->clearUserList()->setUserList('oYRmUuEetrbelAbvEGIIREm_IoNg')->infoBatchGet();
    var_dump($ret);
}  

获取公众号的黑名单列表

function testTagsGetBlackList()
{
    global $access_token;

    $tags = Tags::getInstance();
    $ret = $tags->setAccessToken($access_token)->membersGetBlackList();
    var_dump($ret);
}

拉黑用户

function testTagsBatchBlackList()
{
    global $access_token;

    $tags = Tags::getInstance();
    $ret = $tags->setAccessToken($access_token)->clearBlackOpenidList()->setBlackOpenidList('oYRmUuEetrbelAbvEGIIREm_IoNg')->membersBatchBlackList();
    var_dump($ret);
}

取消拉黑用户

function testTagsBatchUnBlackList()
{
    global $access_token;

    $tags = Tags::getInstance();
    $ret = $tags->setAccessToken($access_token)->clearBlackOpenidList()->setBlackOpenidList('oYRmUuEetrbelAbvEGIIREm_IoNg')->membersBatchBlackUnBlackList();
    var_dump($ret);
}