为什么facebook“发送”按钮呈现空白空白窗口?

时间:2012-06-08 12:14:46

标签: javascript html facebook

我添加了来自facebook api的代码,而Like按钮效果很好,但是当按下“发送”按钮时,它会呈现一个空的空白窗口

enter image description here

我根本无法让它工作......代码正是Facebook提供的,那么我的css问题是什么?我根本不这么认为,因为此空白iframe中的html的<body>为空(添加到生成的iframe的html内容下方):

    <html lang="ro" id="facebook" class=""><head><meta charset="utf-8"><script>function envFlush(a){function b(c){for(var d in a)c[d]=a[d];}if(window.requireLazy){requireLazy(['Env'],b);}else{Env=window.Env||{};b(Env);}}
    envFlush({"user":"100001239412598","locale":"ro_RO","method":"GET","svn_rev":570203,"tier":"","vip":"69.171.247.37","static_base":"http:\/\/static.ak.fbcdn.net\/","www_base":"http:\/\/www.facebook.com\/","rep_lag":2,"fb_dtsg":"AQBOKqPl","ajaxpipe_token":"AXhXQi8-oWUGGfAu","lhsh":"KAQFH3p9n","tracking_domain":"http:\/\/pixel.facebook.com","retry_ajax_on_network_error":"1","fbid_emoticons":"1"});</script><script>envFlush({"eagleEyeConfig":{"seed":"1kC9","sessionStorage":true}});CavalryLogger=false;window._script_path = "\/plugins\/send_button_form_shell.php";</script><noscript> &lt;meta http-equiv="refresh" content="0; URL=/plugins/send_button_form_shell.php?anchorTargetX=88&amp;amp;anchorTargetY=9.5&amp;amp;api_key=315447585207093&amp;amp;channel=http%3A%2F%2Fstatic.ak.facebook.com%2Fconnect%2Fxd_arbiter.php%3Fversion%3D6%23cb%3Df22a63973%26origin%3Dhttp%253A%252F%252Flocalhost%253A2263%252Ffec0b9f18%26domain%3Dlocalhost%26relation%3Dparent.parent&amp;amp;controllerID=u7jiqd_4&amp;amp;error&amp;amp;extended_social_context=false&amp;amp;locale=en_GB&amp;amp;nodeURL=http%3A%2F%2Fconvertmypdftoword.com%2F&amp;amp;offsetX=77&amp;amp;offsetY=20&amp;amp;sdk=joey&amp;amp;_fb_noscript=1" /&gt; </noscript>
    <meta name="robots" content="noodp, noydir"><meta name="description" content=" Facebook este o reţea socială care conectează oamenii cu prietenii lor şi cu alte persoane care lucrează, studiază şi trăiesc în preajma lor. Oamenii folosesc Facebook pentru a ţine legătura cu prietenii, pentru a încărca un număr nelimitat de fotografii, pentru a posta link-uri şi videoclipuri şi pentru a afla mai multe despre oamenii pe care îi întâlnesc."><link rel="alternate" media="handheld" href="http://www.facebook.com/plugins/send_button_form_shell.php?anchorTargetX=88&amp;anchorTargetY=9.5&amp;api_key=315447585207093&amp;channel=http%3A%2F%2Fstatic.ak.facebook.com%2Fconnect%2Fxd_arbiter.php%3Fversion%3D6%23cb%3Df22a63973%26origin%3Dhttp%253A%252F%252Flocalhost%253A2263%252Ffec0b9f18%26domain%3Dlocalhost%26relation%3Dparent.parent&amp;controllerID=u7jiqd_4&amp;error&amp;extended_social_context=false&amp;locale=en_GB&amp;nodeURL=http%3A%2F%2Fconvertmypdftoword.com%2F&amp;offsetX=77&amp;offsetY=20&amp;sdk=joey">
        <link rel="stylesheet" href="http://static.ak.fbcdn.net/rsrc.php/v2/yQ/r/6hVMLER2b2X.css">
        <link rel="stylesheet" href="http://static.ak.fbcdn.net/rsrc.php/v2/yy/r/jgXc1egys1V.css">

        <script src="http://static.ak.fbcdn.net/rsrc.php/v2/y5/r/_xZSy89IRtb.js"></script>
      <script>window.Bootloader && Bootloader.done(["Mw+jI"]);</script></head>
<body></body>
</html>

还有其他人遇到过这个问题吗?

2 个答案:

答案 0 :(得分:2)

在我为facebook添加元标记后,它可以正常工作:

<meta property="og:title" content="your_content"/>

<meta property="og:image" content="your_logo"/>

<meta property="og:type" content="website"/>

<meta property="fb:app_id" content="your_app_id"/>

答案 1 :(得分:0)

如果仍有问题,请检查此工具: https://developers.facebook.com/tools/debug

它检查您的网站并告诉您缺少的内容,例如:

类似应该修复的按钮警告

Admins And App ID Missing - fb:admins and fb:app_id tags are missing. These tags are necessary for Facebook to render a News Feed story that generates a high click-through rate.

Like Button Tag Missing - og:title is missing. The og:title meta tag is necessary for Facebook to render a News Feed story that generates a high click-through rate.

Like Button Tag Missing - og:type is missing. The og:type meta tag is necessary for Facebook to render a News Feed story that generates a high click-through rate.

Like Button Tag Missing - og:image is missing. The og:image meta tag is necessary for Facebook to render a News Feed story that generates a high click-through rate.