Facebook JS SDK不能在Safari上工作 [英] Facebook JS SDK Not Working On Safari
问题描述
查看JS错误我收到以下消息。他们来自作为FB的JS库的all.js。任何人有任何想法?
fb-rootdiv尚未创建。 (all.js Line 3)
TypeError:'undefined'不是一个对象(评估'e.root.appendChild')(all.js第6行)
使用Facebook的all.js时,您需要确保您有 div
,其ID设置为 fb-root
通常低于正文
标签。确保你有:
......
< body>
< div id =fb-root>< / div>
< script>
// facebook js code here
< / script>
您发布的错误消息清楚地表示没有找到这样的div,这意味着你应该您的页面如上所示。
I've got an implementation of the Facebook SDK that I'm using in my site. It works great on every browser minus Safari where occasionally the Facebook Connect button won't load.
Looking at the JS errors I'm getting the following messages. They're coming from all.js which is FB's JS library. Anyone got any ideas?
The "fb-root" div has not been created. (all.js Line 3)
TypeError: 'undefined' is not an object (evaluating 'e.root.appendChild') (all.js Line 6)
When working with Facebook's all.js, you need to make sure that you have div
with id set to fb-root
typically below the body
tag. Make sure you have:
......
<body>
<div id="fb-root"></div>
<script>
// facebook js code here
</script>
The error message you have posted clearly says it does not find such div which means you should have it on your page like shown above.
这篇关于Facebook JS SDK不能在Safari上工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!