facebook like button on my site only shows up after you refresh the page. does it have to do with all.js

I used code from http://developers.facebook.com/docs/reference/plugins/like/

to add a like button on the site. I have the script tags right after the body as described and the div further down by my header, but when I load the page, the like button is not there. but if I hit refresh its there. my guess is that the all.js is taking too long to load and its missed somehow on the 1st load. on the 2nd refresh, I assume the js is cached and things work as expected.

any idea how to wait on this? I have tried putting the script in the head, at the bottom.

Answers


When you say "I have the script tags right after the body", do you mean outside of the body? If so, try putting it in side the body, but after all other element inside of the body.

<body> ...other code ...other code ...other code 
  <script>Put your script here</script> 
</body>

Need Your Help

How can I fetch all records from cloudkit

ios arrays swift cloudkit ckrecord

I am having trouble getting my application to fetch all of one type of record and have each users record put into an array.

What is the difference between AppBarLayout vs Toolbar?

android androiddesignsupport

I want to include Toolbar in my app, but the design support library just came out with AppBarLayout, so I just need clarification on what the difference is and when I would use one over the other.