I have some problems with the Facebook FB.UI dialog - Feed and Sare. I need to send a website page to a friend, I am using the FB.UI Javascript API. According to the documentation on facebook, they said that you need to use the "from and to" parameter. But when I use the "from and to" options, this does not work. When I delete these options, it works fine, but I can not post a message to my friends wall.
I searched for a while and tried the following steps:
This is a link to the documentation: Transmission and exchange channels
This is my code:
PS: I get a warning that says: "Message has been posted", but it does not appear on facebook.
function share()
{
FB.ui({
method: 'feed',
name: 'The name',
link: 'The URL',
from: '100001738814056',
to: '100003105898115',
caption: 'An example caption',
}, function(response) {
if (response && response.post_id) {
alert('Post was published.');
} else {
alert('Post was not published.');
}
}
);
}
edit: I have additional information about my problem, and I think I found the problem. If you look at this image, you will see a line with: "Feed" and one with "? Api_key =". If I looked at the feed URL, I think it skips the get api key, not sure if it is correct
Image link
source
share