Facebook Feeds Popup Dialog Does Not Close

和自甴很熟 提交于 2019-12-12 03:57:28

问题


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>

来源:https://stackoverflow.com/questions/15377274/facebook-feeds-popup-dialog-does-not-close

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!