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

时间:2013-02-14 03:05:08

标签: facebook facebook-social-plugins

尝试将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>

1 个答案:

答案 0 :(得分:0)

这可能只是一个Facebook插件错误,并不是你的代码影响了插件,因为它是在iframe中加载的。你还在问这个问题吗?如果您是,则最好report the bug to Facebook或查看是否存在与此问题相关的现有错误。