2013-04-28 67 views
0

在我的wordpress网站上,我有很多像og.watch,fb.login和其他人的Facebook交互。比如我用:我的wordpress上的Facebook冲突

http://w.sharethis.com/button/buttons.js

一些按钮和这个js包括来自Facebook all.js。这是在头上。

再在脑子里,我有:

<script type="text/javascript"> 
    window.fbAsyncInit = function(){ 
     FB.init({ 
      appId: xxxxxxxxxx, 
      status:true, 
      cookie:true, 
      xfbml:true, 
      oauth:true 
     }); 
    }; 
</script> 
<div id="fb-root"></div> 
<script type="text/javascript"> 
// 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/ro_RO/all.js"; 
    ref.parentNode.insertBefore(js, ref); 
    }(document)); 
</script> 

及脚注我有一个插件女巫使用fb.edge FB样popup.js验证一个类似按钮。

的主要问题是,有时像控制台错误得到:Fb.init不是在FB样popup.js定义,当我在页面上有这样的错误,我不能从使用Facebook功能我页。

问题1:为什么我得到不同的文件fb.init没有定义,而我的头部fb.init?

问题2:有一次我所有的网站页面定义的Facebook的方法?

回答

0

首先,我想观察一下,我所知道的要求是<div id="fb-root"></div>和Facebook sdk脚本应该在body标签之上,两者之间没有任何内容。