Well, now i am getting "has to be an array", before it had to be a string.
Can someone help me out of this problem? Check comments.
function publishPhoto() {
var tags = []; var x,y=0;
if ( harBilled == 0 ) {
if ( profilSendt==0) {
var c =0;
//Get the online friends from array!
for ( i=0;i<globalTags.length;i++){
if ( c < 49 ){ //max 50 tags!
tags.push({"tag_uid": ""+globalTags[i]+"",
"x" : ""+(Math.floor(Math.random() * 309) + 1)+"",
"y" : ""+(Math.floor(Math.random() * 309) + 1)+""
});
}
c = c+1;
}
var newJson = new String(array2json(tags));
newJson = newJson.toString();
FB.api('me/photos', 'post', {
message: txt2send,
status: 'success',
url: 'http://meedies.com/0bcf1f22_smush_400x400.jpeg',
}, function (response) {
if (!response || response.error) {
harBilled=0;
alert(var_dump(response.error));
} else {
var fi = response.id;
alert("Now this!");
FB.api(fi + '/tags?tags='+tags, 'POST', function(response){
alert(var_dump(response));
});
harBilled=1;
//getPages()
}
})
profilSendt=1;
}
}
I am trying to insert multiple ids to be tagged on a picture. Can something help me though this correctly