使用FB.ui发布带参数display:popup的feed。当用户选择“取消”或“共享”之后,“redirect_uri”参数中指定的网站将显示在弹出窗口中。 Facebook文档指出,当取消按钮时,应该关闭弹出对话框。
这是我的代码。我做错了什么?
<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>