帮我标记多个朋友的状态,我正在通过我的设备从我的应用程序更新。这就是我正在做的事情
var data = {
link : "http://www.appcelerator.com",
name : "Appcelerator Titanium (iteration " + iter + ")",
tags : ("1234","5678"),
accesstoken : "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
message : "Awesome SDKs for building desktop and mobile apps ",
place : "XXXXXXXX",
caption : "Appcelerator Titanium (iteration " + iter + ")",
picture : "http://developer.appcelerator.com/assets/img/DEV_titmobile_image.png",
description : "You've got the ideas, now you've got the power. Titanium translates your hard won web skills..."
};
fb.requestWithGraphPath('me/feed', data, 'POST', showRequestResult);
当我只运行上面提到的“5678”id的第二个用户时,会被标记而不是第一个用户。 我也尝试过其他方法,比如
tags1 : {
'tags' : [{
"id" : "12345"
}, {
"id" : "12345"
}, {
"id" : "56789"
}, {
"id" : "457889"
}, {
"id" : "567890"
}, {
"id" : "987654"
}, {
"id" : "98765"
}]
},
我收到错误,因为(#100)param标签必须是数组
我也试过这个方法
var idnos = [];
idNos[0] = "123456";
idNos[1] = "4567";
idNos[2] = "456788";
idNos[3] = "45678989";
idNos[4] = "987654";
idNos[5] = "4567889";
tags = idnos
答案 0 :(得分:0)
标记字段的参数应该是一个数组。所以不要这样:
var data = {
link : "http://www.appcelerator.com",
name : "Appcelerator Titanium (iteration " + iter + ")",
tags : ("1234","5678"),
accesstoken : "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
message : "Awesome SDKs for building desktop and mobile apps ",
place : "XXXXXXXX",
caption : "Appcelerator Titanium (iteration " + iter + ")",
picture : "http://developer.appcelerator.com/assets/img/DEV_titmobile_image.png",
description : "You've got the ideas, now you've got the power. Titanium translates your hard won web skills..."
};
使用:
var data = {
link : "http://www.appcelerator.com",
name : "Appcelerator Titanium (iteration " + iter + ")",
tags : [{ "tag_uid":"1234" },{ "tag_uid":"5678" }],
accesstoken : "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
message : "Awesome SDKs for building desktop and mobile apps ",
place : "XXXXXXXX",
caption : "Appcelerator Titanium (iteration " + iter + ")",
picture : "http://developer.appcelerator.com/assets/img/DEV_titmobile_image.png",
description : "You've got the ideas, now you've got the power. Titanium translates your hard won web skills..."
};