Skip to content
This repository has been archived by the owner on Jan 16, 2018. It is now read-only.

CP_标签管理

Daniel Qian edited this page Oct 22, 2014 · 1 revision

新建标签

要注意的是,通过API新建的标签默认处于解锁状态,要到管理员界面里把标签锁定,然后再刷新管理员界面,才能够在管理员界面删除标签

tagId = wxService.tagCreate("测试标签4");

更新标签

wxService.tagUpdate(tagId, "测试标签-改名");

获得标签

List<WxCpTag> tags = wxService.tagGet();

将用户添加到标签

List<String> userIds = new ArrayList<String>();
userIds.add(userId);
wxService.tagAddUsers(tagId, userIds);

获取某标签下用户

List<WxCpUser> users = wxService.tagGetUsers(tagId);

将用户从标签中移除

List<String> userIds = new ArrayList<String>();
userIds.add(userId);
wxService.tagRemoveUsers(tagId, userIds);

删除标签

wxService.tagDelete(tagId);