Reputation: 7585
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)
Upvotes: 0
Views: 3708
Reputation: 31880
How many fb-root divs do you have? If you have multiple it might confuse the API on the Safari browser.
Upvotes: 1
Reputation: 382831
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.
Upvotes: 4