使用多个.js API时出现Facebook错误 [英] Facebook errors when using multiple .js api
问题描述
我的网页上有两个Facebook API,一个是 https://connect.facebook.net/en_US/all.js ,另一个是 http://static.ak.fbcdn.net/connect.php/js/FB.Share
I have two Facebook API on my webpage, one is https://connect.facebook.net/en_US/all.js and the other one is http://static.ak.fbcdn.net/connect.php/js/FB.Share
现在,如果我同时拥有这两个功能,则会出现错误:FB.init不是函数
Now if I have both of these, then there is error: FB.init is not a function
没有FB.Share API,一切都很好.
Without the FB.Share API, everything is fine.
.js文件顺序导致错误.现在出现"e.root is undefined"错误.
.js file order caused the error. Now there is "e.root is undefined" error.
已修复.
推荐答案
我从未发现 all.js
中缺少任何内容,因此就足够了.您在第二个图书馆中寻找什么?
I have never found anything missing from all.js
, so that should suffice. What are you looking for in the second library?
两个脚本中必须有冲突的项目,当它们一前一后运行时会导致失败.
There must be conflicting items across the two scripts that is causing a failure when ran in tandem.
这篇关于使用多个.js API时出现Facebook错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!