注册

解除IM用户好友关系执行成功,但是没有解除..

以下是我写的demo:tok是获取成功的.self是自身好友.target是要删除的好友.
执行时success的.但是后台没有删掉这个好友.大神帮忙看下是为什么?


function dele(self,target){
$.ajax({
type: 'post',
contentType: 'application/json',
dataType: 'json',
async: false,
url: 'https://a1.easemob.com/fyl/testhx/users/'+self+'/contacts/users/'+target,
headers:{
"Authorization":"Bearer "+tok
},
success: function (data) {
alert("success:" + data);
},
error: function (data) {
alert("error:" + data);
}
});
}


已邀请:
调rest接口看看这个用户的好友是否还存在这个用户http://easemob.com/docs/rest/userapi/#queryfriend
返回数据如下:
da: Object
action: "post"
application: "12381b70-d99c-11e4-b501-838fac4e245e"
applicationName: "testhx"
duration: 130
entities: Array
0: Object
activated: true
created: 1428631325136
modified: 1428631325136
nickname: "Leefo2"
type: "user"
username: "Leefo2"
uuid: "96008d0a-df25-11e4-b43f-af1b43fcf2ab"
__proto__: Object
length: 1
__proto__: Array
organization: "fyl"
path: "/users/714eef6a-df25-11e4-b7af-2306dbc1e12e/contacts"
timestamp: 1428892712102
uri: "https://a1.easemob.com/fyl/testhx/users/714eef6a-df25-11e4-b7af-2306dbc1e12e/contacts"
> forum.php?mod=redirect&goto=findpost&pid=1745&ptid=833
返回数据如下:
da: Object
action: "post"


你这个请求的response是删除好友的吗? delete 方法解除好友关系

要回复问题请先登录注册