Facebook喜欢按钮评论框不会在提交时关闭,也不会发布任何内容



尝试将类似facebook的社交按钮插件与评论框集成。类似/不同功能运行良好,它在我在Facebook上的活动日志中反映得很好。然而,一旦我在评论框中输入评论并点击"发布到脸书",什么都不会发生!当我提交时,评论框不会关闭,也不会在时间线上发布任何内容。

我可以在Firefox调试器中看到post请求。Facebook调试器不会报告页面上的任何错误,并提取元标记。

请参阅下面的代码:我做错了什么或遗漏了什么?

<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en-US"
  xmlns:og="http://ogp.me/ns#"
  xmlns:fb="https://www.facebook.com/2008/fbml">
<head prefix="og: http://ogp.me/ns# fb: http://ogp.me/ns/fb# website: http://ogp.me/ns/website#">
    <meta property="og:title" content="mytitle" />
    <meta property="og:description" content="mydescription" />
    <meta property="og:type" content="website" />
    <meta property="og:url" content="<?php echo $this->baseUrl(); ?>/welcome"/>
    <meta property="og:image" content="<?php echo $this->baseUrl(); ?>/images/screen_shot_general.jpg" />
    <meta property="og:site_name" content="myname" />
    <meta property="fb:app_id" content="xxxxxxxxx" />
</head>
<body>
    <div id="fb-root"></div>
    <script>
           window.fbAsyncInit = function() {
            FB.init({
            appId      : 'xxxxxx', // App ID
            channelUrl : '<?php echo $this->baseUrl(); ?>/channel.html', // Channel File
            status     : true, // check login status
            cookie     : true, // enable cookies to allow the server to access the session
            xfbml      : true  // parse XFBML
            });
            // Additional initialization code here
        };

        // Load the SDK Asynchronously
        (function(d){
        var js, id = 'facebook-jssdk', ref = d.getElementsByTagName('script')[0];
        if (d.getElementById(id)) {return;}
        js = d.createElement('script'); js.id = id; js.async = true;
        js.src = "//connect.facebook.net/en_US/all.js";
        ref.parentNode.insertBefore(js, ref);
        }(document));                
   </script>    
<div class="fb-like" data-href="<?php echo $this->baseUrl(); ?>" data-send="false" data-layout="button_count" data-width="90" data-show-faces="false" data-font="lucida grande"></div>

这可能只是一个Facebook插件错误,影响插件的不是您的代码,因为它是在iframe中加载的。你仍然有问题吗?如果是,最好向Facebook报告该错误,或者查看是否存在与该问题相关的现有错误。

相关内容

最新更新