You should load the Javascript Library Asynchronously and put all your FB related functions inside the window.fbAsyncInit method:
Lee mas