How to Add Google+ Comments to Any Webpage or Blog [Unofficially]

google comments

google commentsGoogle recently launched functionality that allows you to integrate Google+ Comments on your Blogger blog.

Even though Google has yet to launch an official API for the Google+ comments feature, Browsing the Net discovered a way for you to embed Google+ Comments on any website or blog too!
 

  1. Edit your website code and add this HTML:
    <script src="https://apis.google.com/js/plusone.js">
    </script>
    <g:comments
        href="[URL]"
        width="642"
        first_party_property="BLOGGER"
        view_type="FILTERED_POSTMOD">
    </g:comments>

    or a valid HTML5 version:

    <script src="https://apis.google.com/js/plusone.js">
    </script>
    <div class="g-comments"
        data-href="[URL]"
        data-width="642"
        data-first_party_property="BLOGGER"
        data-view_type="FILTERED_POSTMOD">
    </div>
  2. To insert a comments counter, add this HTML code instead of <g:comments>:
    <g:commentcount href="[URL]"></g:commentcount>

    or a valid HTML5 version instead of <div class="g-comments">:

    <div class="g-commentcount" data-href="[URL]"></div>
  3. Replace [URL] with the URL of your web page and fit the width.
  4. Link your web page to your Google+ profile to verify authorship.
And if you prefer to load Google+ Comments dynamically, insert this HTML code:

<div id="comments"></div>
<script>
gapi.comments.render('comments', {
    href: window.location,
    width: '624',
    first_party_property: 'BLOGGER',
    view_type: 'FILTERED_POSTMOD'
});
</script>

Similarly with Google+ Comments Counter:

<div id="commentscounter"></div>
<script>
gapi.commentcount.render('commentscounter', {
    href: window.location
});
</script>

 

What does it look like in action?




You can also see it in use for any link on the Google+ and Facebook Comments page.

Given Google’s power already in search, do you think Google+ Comments could become the de facto standard for blogs?
 

Daniel Zeevi

By Daniel Zeevi

Daniel is a social network architect, web developer, infographic designer, writer, speaker and founder of DashBurst. Full-time futurist and part-time content curator, always on the hunt for disruptive new technology, creative art and web humor.

3 comments

Leave a comment