I have this code which posts to the user’s wall:
FB.api('/me/photos', 'post', {
message:'photo description',
url:imgURL
}, function(response){
console.log(response);
if (!response || response.error) {
console.log(response);
}else{
FB.api(response.id+'/tags/me', {
to: $("#recipientID").val()
}, function(response){
console.log(response)
});
}
});
The first part works perfectly I just cannot figure out how to tag a friend into it, my tag call gives me an empty array back. Facebook documentation is really difficult to understand and it doesn’t really give any examples of how to do this so please don’t just give me a link to their documentation because I’ve already read anything they have that’s relevant and I still can’t do it.
Also tried this with no success:
FB.api('/me', function(response){
var userId = response.id;
FB.api('/'+response.id+'/tags/'+userId, {
to: $("#recipientID").val()
}, function(response){
console.log(response)
});
});
I finally managed to crack it, it’s a different call than what I was using: