Blogger Ever

Complete blogger JSON data to fetch recent comments using Javascript

Blogger provides a full RSS and JSON format of the recent published or updated comments through which we can fetch recent comments.

 I've been discussing Blogger feeds previously about recent posts but this time I collected the JSON path of each data to achieve the recent comments. Secondly it also works cross domain means, you can also get comments of other Blogger blogs to your blog/site, it helps people to manage multiple blogs or show comments on site of the blogs.
Well, its not a complex one to use Javascript to get recent comments. This is an example how to get recent comments:

<script type='text/javascript'>
    function recentcomments(json) {
      for (var i = 0; i < json.feed.entry.length; i++) {
        var comment=json.feed.entry[i];
          for (var j = 0; j <; j++) {
              if ([j].rel == 'alternate') {
                  var commentlink =[j].href;
          for (var c = 0; c <$extendedProperty.length; c++) {
              if ($extendedProperty[c].name == 'blogger.displayTime') {
                  var datePub =$extendedProperty[c].value;
          var commentcontent = comment.title.$t,
              authorname =[0].name.$t,
              authorimage =[0].gd$image.src,
                   item = '<div class="comment-item"><span>' + authorname + '</span> said, "<a href="'+commentlink+'">' + commentcontent + '</a>" on ' + datePub + '</div>';
  <script src=""></script>

 Well, there is a lot data in Blogger comment feed like Blog name, authors etc. But we actually need comments, so I'll jump on it and giving out the JSON path of those following data only.

The feed URL for comment is:
Highlighted stuff should edited in a way that will be replaced by any blogger based blog URL, max-results is set to 5 which could be any number of comments return and callback name could be any function name, well in this case its recentcomments.
Object Description Example
json.feed.entry[i] An array of comments. *No Example
json.feed.entry[i].id.$t A unique id of each comment.,
json.feed.entry[i].published.$t Date and time, the comment published. 2014-04-26T01:48:07.825-07:00
json.feed.entry[i].updated.$t Date and time, the comment updated last. 2014-04-26T01:48:07.825-07:00
json.feed.entry[i].title.$t Returns a small part of comment in text form. Hi, I would like to subscribe for this web site to...
json.feed.entry[i].content.$t Returns complete comment content in HTML format. Means if someone added any link then the link will be shows too. Hi, I would like to subscribe for this web site to get most up-to-date updates, so where can i do it please help.
json.feed.entry[i].link[j].href Link of the post with hash tag to that comment, that directly shows the comment. http:\/\/\/2014\/02\/how-to-create-popup-on-button-click.html?showComment=1398502087825#c379694332297666401
json.feed.entry[i]$t Name of the commentator Hamza
json.feed.entry[i]$image.src URL of the image of the author, used on Google Plus. In case if author in anonymous then URL will be "http:\/\/\/img\/blank.gif", so you can use if condition to change it with your own image src. \/\/\/-CPGlkbR67xU\/AAAAAAAAAAI\/AAAAAAAAEeg\/sFtUf8ZJfhI\/s512-c\/photo.jpg
json.feed.entry[i].thr$in-reply-to.href Link of the post, without comment hash. http:\/\/\/2013\/08\/tips-of-using-of-masonry-plugin-on.html
json.feed.entry[i].gd$extendedProperty[c].value This one have time and date in standard form but make sure to carryout this value with if condition like one in example above because this is an array. 18 April 2014 at 22:04
So that is all for JSON path. If found something weird comment below or contact me. :)

2013-2016 Copyright Blogger E\ver . Coded, managed and founded by Mohammad Hamza (@hamzadhamiya) . Hosted on Blogger and fonts used are Raleway and Open Sans.