I need to send to user's friends in facebook some link from my site or predefined message. I got the list friends by this:
FB.api(
"/me/taggable_friends",
function (response) {
if (response && !response.error) {
console.log(response.data);
}
}
);
which is OK, I'm getting some friends.
At this question Send private messages to friends
author says I need so call method send
of API:
function facebook_send_message(to) {
FB.ui({
app_id:'xxxxxxxx',
method: 'send',
name: "sdfds jj jjjsdj j j ",
link: 'https://apps.facebook.com/xxxxxxxaxsa',
to:to,
description:'sasa d d dssd ds sd s s s '
});
}
It looks simple. Having friends as array of objects:
Object
id: "AaI7nqazWWHMkCjMrKNlvyFHWBRw......HFyppVJqjg4RBZurBg"
name: "Andre ...."
picture: Object
I hoped that I could to create array with id
and use array in send
-method of api in to:
. But trying to start dialog I'm getting error "Bad param". The same if I use the name-property of object.
What do I do wrong ?