Skip to content

Instantly share code, notes, and snippets.

@rainabba
Created May 29, 2014 01:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rainabba/3f4fe16cc40bf98b2272 to your computer and use it in GitHub Desktop.
Save rainabba/3f4fe16cc40bf98b2272 to your computer and use it in GitHub Desktop.
G+ Comments on any page
// Simplified version of what I found at http://dashburst.com/how-to-add-google-comments-to-any-webpage-or-blog-unofficially/
// This assumes jQuery support as $
<script src="https://apis.google.com/js/plusone.js"></script>
<div id="commentscounter"></div>
<div id="gpcomments"></div>
<script>
$(function() {
gapi.comments.render('gpcomments', { href: window.location, first_party_property: 'BLOGGER', view_type: 'FILTERED_POSTMOD' });
gapi.commentcount.render('commentscounter', { href: window.location });
});
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment