0

使用 FB.ui 发布带有参数 display:popup 的提要。当用户选择“取消”或在“共享”之后,“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>
4

0 回答 0