Facebook喜欢按钮评论框不会关闭提交,不发布任何内容 [英] facebook like button comment box won't close on submit, and doesn't post anything

查看:99
本文介绍了Facebook喜欢按钮评论框不会关闭提交,不发布任何内容的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

试图将一个Facebook社交的按钮插件与评论框进行整合。类似/不同的功能可以正常工作,它在我的活动日志中正确地反映在Facebook上。
但是,一旦我在评论框中输入评论,点击发布到脸书,没有任何反应!我提交的评论框不会关闭,它不会在时间线中发布任何内容。

Trying to integrate a facebook social like button plugin with the comment box. The like/unlike function works fine, and it reflects properly in my activity log on Facebook. However, once I type in a comment in the comment box and click "post to facebook", nothing happens! The comment box won't close when I submit, and it doesn't publish anything in the timeline.

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

I can see the post request in Firefox debugger. Facebook debugger doesn't report any errors on the page, and extracts the meta tags.

看到我的代码如下:我做错了什么或缺少?

See my code below: What am I doing wrong or missing?

<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报告错误,或查看是否存在与之相关的现有错误问题。

This is probably just a Facebook Plugin bug and it's not your code that's affecting the plugin, since it's loaded within an iframe. Are you still getting the issue? If you are, it's best to report the bug to Facebook or see if there is an existing bug that relates to the issue.

这篇关于Facebook喜欢按钮评论框不会关闭提交,不发布任何内容的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆