Skip to content

Instantly share code, notes, and snippets.

@Trippnology
Created May 29, 2013 17:06
Show Gist options
  • Save Trippnology/5671947 to your computer and use it in GitHub Desktop.
Save Trippnology/5671947 to your computer and use it in GitHub Desktop.
Facebook like button that validates. Now outdated, see http://developers.facebook.com/docs/reference/plugins/like/
<script type="text/javascript">
//<![CDATA[
(function() {
document.write('<fb:like width="200"></fb:like>');
var s = document.createElement('SCRIPT'), s1 = document.getElementsByTagName('SCRIPT')[0];
s.type = 'text/javascript';
s.async = true;
s.src = 'http://connect.facebook.net/en_US/all.js#xfbml=1';
s1.parentNode.insertBefore(s, s1);
})();
//]]>
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment