Skip to content

Instantly share code, notes, and snippets.

@stevereich
Created October 3, 2012 04:38
Show Gist options
  • Save stevereich/3825026 to your computer and use it in GitHub Desktop.
Save stevereich/3825026 to your computer and use it in GitHub Desktop.
Facebook comment count on blogger
// this code goes right after <data:post.body/>
<b:if cond='data:post.isFirstPost'>
<script>(function(d){
var js, id = &#39;facebook-jssdk&#39;; if (d.getElementById(id)) {return;}
js = d.createElement(&#39;script&#39;); js.id = id; js.async = true;
js.src = &quot;//connect.facebook.net/en_US/all.js#xfbml=1&quot;;
d.getElementsByTagName(&#39;head&#39;)[0].appendChild(js);
}(document));</script>
</b:if>
<a expr:href='data:post.url + &quot;#fb-root&quot;'><fb:comments-count expr:href='data:post.canonicalUrl'/> comments</a>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment