本文介绍了FB在Firefox 4中未定义错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在安装Firefox 4后最近裁剪了这个错误。
This error recently cropped after I installed Firefox 4.
我正在使用异步加载FB SDK。将fb-root div放在标签后面。
I am using asynchronous loading of FB SDK. Have placed the fb-root div just after tag.
我调用 FB.Canvas.setAutoResize();
$(document).ready()
。我也添加了以下html标签:
I call FB.Canvas.setAutoResize();
in the $(document).ready()
. I have added the following html tag too :
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:fb="http://www.facebook.com/2008/fbml">
我缺少什么?
在此尝试:
推荐答案
$(document).ready
不保证您已经加载了FB SDK。您应该确保在SDK加载时执行对 FB
对象的任何调用,可能是异步加载的回调。
$(document).ready
doesn't assure you that the FB SDK has been loaded. You should make sure any calls to the FB
object are performed when the SDK has been loaded, presumably there's a callback for the asynch load.
这篇关于FB在Firefox 4中未定义错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!