Hướng dẫn thêm Google+ Comment cho Website

155 views
Skip to first unread message

Đào Quế Hằng

unread,
Apr 25, 2013, 4:35:01 AM4/25/13
to groups...@googlegroups.com

Hum nay tình cờ đọc được bài viết khá hay từ Igoo.vn của a Bình Nguyễn chia sẻ về cách thêm g+ comment cho website, mình cũng đã thử cho website của mình, nay mình chia sẻ trên đây

Sử dụng Google+ Comment sẽ có rất nhiều lợi thế trong SEO Website, nó chính là mức độ tương tác, chia sẻ, comment về bài viết của bạn.

Google+ Comment

Và đây là hướng dẫn chi tiết và rất đơn giản, bạn chỉ việc thêm Mã Code vào vị trí trong Website là thành công:

Thêm nhận xét Google+ Comment:

<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>

Dành cho HTML5

<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>

 

Hiển thị số Google+ Comment:

g:comments>: <g:commentcount href="[URL]"></g:commentcount>

Dành cho HTML5

<div class="g-comments">: <div class="g-commentcount" data-href="[URL]"></div>

Chú ý thay thế [URL] = đường dẫn bạn muốn comment, phần này biết Code cho tự động URL là URL hiện tại là Oki.

 

Nếu bạn muốn lấy tự động đường dẫn của website thì sử dụng Code sau:

<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>

Reply all
Reply to author
Forward
0 new messages