How do I add a dynamic Facebook like button to every node of a certain content type
Inside a template_preprocess_node() I have done:

/**
 * Implements template_preprocess_node().
 */
function MYTHEME_preprocess_node(&amp;$variables) {
  $node = $variables['node'];
  $variables['full_url'] = url('node/' . $node-&gt;nid, array('absolute' =&gt; TRUE));
}


Then in my node.tpl.php, I have

&lt;?php // http://developers.facebook.com/docs/reference/plugins/like/ ?&gt;

&lt;div class="fb-like" data-href="&lt;?php print $full_url; ?&gt;" data-send="true"
  data-layout="button_count" data-width="450" data-show-faces="false"&gt;&lt;/div&gt;
&lt;script&gt;
  (function ($) {
    try {
      FB.XFBML.parse();
    } catch (e) {
      $('.fb-like').remove();            
    }
  })(jQuery);
&lt;/script&gt;


In my html.tpl.php, I will hardcode the JS include so that it is right after the body (so I am not at the mercy of render trees, preprocess, etc:

&lt;div id="fb-root"&gt;&lt;/div&gt;
&lt;script&gt;(function(d, s, id) {
  var js, fjs = d.getElementsByTagName(s)[0];
  if (d.getElementById(id)) return;
  js = d.createElement(s); js.id = id;
  js.src = "//connect.facebook.net/en_US/all.js#xfbml=1";
  fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));&lt;/script&gt;


This is from a pretty specific use case on a recent site.  I am not 100% sure if I tested this with multiple nodes on a single page, as the site I did this on doesn't have pages like that.