Quantcast
Channel: Google AJAX Feed API: How to display 6 blog entries rather than the default 4 one - Stack Overflow
Viewing all articles
Browse latest Browse all 2

Google AJAX Feed API: How to display 6 blog entries rather than the default 4 one

$
0
0

I need some help in using Google AJAX Feed API. As we know by default this API lists latest 4 blog entries. What code changes to do so that it shows say 5 or 6 latest entries? I cant figure it out in code.

Here is the example function:

google.load("feeds", "1");

function initialize() {  var feed = new google.feeds.Feed("http://www.digg.com/rss/index.xml");  feed.load(function(result) {    if (!result.error) {      var container = document.getElementById("feed");      for (var i = 0; i < result.feed.entries.length; i++) {        var entry = result.feed.entries[i];        var div = document.createElement("div");        div.appendChild(document.createTextNode(entry.title));        container.appendChild(div);      }    }  });}google.setOnLoadCallback(initialize);

Any help will appreciated.

Thanks


Viewing all articles
Browse latest Browse all 2

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>