Reputation:
how can post on my facebook friends wall using FB.UI
my code is
FB.ui({
method: 'feed',
link: 'https://developers.facebook.com/docs/',
to:['405631902932995,626150064162274'],
caption: 'An example caption'
}, function (response) {
console.log(response);
});
i am getting error like
API Error Code: 100
API Error Description: Invalid parameter
Error Message: ["100004585663846,100003018593104"] does not resolve to a valid user ID
Upvotes: 0
Views: 316
Reputation: 73984
That parameter only allows to enter one ID, not an array of them. Meaning, what you want to achieve is not possible at all, you can only specify one friend.
https://developers.facebook.com/docs/sharing/reference/feed-dialog/
You can also use the Send Dialog to send a message to a friend: https://developers.facebook.com/docs/sharing/reference/send-dialog
The same applies to the "to" parameter, you can only specify one recipient.
Upvotes: 2