I am trying to append this script below to the end of the body after setTimeout of 3 seconds. The issue i am having is that, I am loading the facebook javascript all.js 3 seconds after the page has loaded for performance reasons, but it does not recognize the settings, so i want to append this script to the body when i load the facebook javascript. How can i do this?
<script>
FB.init({
appId : 'myappid',
status : true,
cookie : true,
xfbml : true
});
</script>
Why would you append the script? Simply invoke this method in your callback for the setTimeout:
This way, you even get loading wait time tolerance.