Using the FB.ui to publish a feed with parameter display:popup. When a user selects the "Cancel" or after "Share", the web site specified in the 'redirect_uri' parameter is displayed within the popup. The Facebook documentation states that the popup dialog should be dismissed when the buttons are cancelled.
Here is my code. What am I doing wrong?
<script src='http://connect.facebook.net/en_US/all.js'></script>
<script>
window.fbAsyncInit = function () {
FB.init({
appId: my APP ID, status: true, cookie: true,
xfbml: false, channelUrl: 'MY URL/fb-channel.html'
});
};
function fbShare(title, fbSiteUrl, fbThumbnailUrl, fbSiteDescription) {
var publish = {
method: 'feed',
name: title,
caption: 'MY CAPTION',
description: fbSiteDescription,
picture: fbThumbnailUrl,
link: fbSiteUrl,
redirect_uri: 'MY WEB SITE URL',
actions: [
{ name: 'MY WEB SITE Name', link: 'MY WEB SITE URL' }
],
display: 'popup'
};
function callback(response) {
}
FB.ui(publish, callback);
}
</script>