I am not using the feed control as I want to output the feed results
and format the HTML myself however all I get is 4 entries no matter
which feed I try. I know this is the default value and have read about
setting setNumEntries to a higher value and also using
includeHistoricalEntries() to get round caching issues.
I have tried about 6 different feeds now and they all return 4
entries.
If it is a caching issue then is there a way to force a clearing of
the feed cache on the server?
A basic example of the code I am using is below:
google.load("feeds", "1");
function initialize() {
// just one of many feeds I have tried
//url = "
http://feeds2.feedburner.com/StrictlySoftware"; //
another one with 44 entries showing 4
url = "
http://www.skysports.com/rss/0,20514,11661,00.xml";
var feed = new google.feeds.Feed(url);
feed.setNumEntries = 20;
feed.includeHistoricalEntries();
for(var x in feed){
console.log(x + " = " + feed[x]);
}
feed.load(function(result) {
if (!result.error) {
// just trying this to see if it had any effect - no it
doesnt!
try{
result.feed.setNumEntries = 20;
result.feed.includeHistoricalEntries();
}catch(e){}
var container = document.getElementById("feed");
// always says 4 entries!!!
console.log("there are " +result.feed.entries.length + " entries");
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);
Am I doing something wrong here??
Thanks in advance for any help received.