PDA

View Full Version : Google Ajax feed displayer



finlandrocks
06-03-2008, 09:27 AM
1) Script Title: gAjax RSS Feeds Displayer

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex18/gajaxrssdisplayer.htm

3) Describe problem: wont display feeds, says "Google feed API error: invalid API KEY", but when i use googles code or other javascript code for displaying the feeds, my API KEY is fine and valid in all other circumstances, just wont work with your gAjax RSS Feeds Displayer code.

Heres the link to my page with (gAjax RSS Feeds Displayer): Feeds (http://www.ubernova.org/feedme/feeds.html)


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>ajax feeds</title>


<script type="text/javascript" src="http://www.google.com/jsapi?key="ABQIAAAAi5cMY-BQfnw5SPk05OspFBRPLe-XmU7Xd4Nn_mOz3CYDK-EBXxToJI6OOF7DdgOU6d2TqBcvfenCwA">
</script>
<script type="text/javascript" src="http://www.ubernova.org/feedme/gfeedfetcher.js">
/***********************************************
* gAjax RSS Feeds Displayer- (c) Dynamic Drive (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit http://www.dynamicdrive.com/ for full source code
***********************************************/
</script>
<style type="text/css">
.labelfield{ /*CSS for label field in general*/
color:brown;
font-size: 90%;
}
.datefield{ /*CSS for date field in general*/
color:gray;
font-size: 90%;
}
#example1 li{ /*CSS specific to demo 1*/
margin-bottom: 4px;
}
#example2 div{ /*CSS specific to demo 2*/
margin-bottom: 5px;
}
#example2 div a{ /*CSS specific to demo 2*/
text-decoration: none;
}
#example3 a{ /*CSS specific to demo 3*/
color: #D80101;
text-decoration: none;
font-weight: bold;
}
#example3 p{ /*CSS specific to demo 3*/
margin-bottom: 2px;
}
code{ /*CSS for insructions*/
color: red;
}
</style>

</head>
<body>

<script type="text/javascript">
var newsfeed=new gfeedfetcher("example3", "example3class", "_new")
newsfeed.addFeed("The Register", "http://www.theregister.co.uk/headlines.atom") //Specify "label" plus URL to RSS feed
newsfeed.addFeed("Top Tech", "http://www.toptechnews.com/feed/rss/syndication.xml") //Specify "label" plus URL to RSS feed
newsfeed.addFeed("Slashdot", "http://rss.slashdot.org/Slashdot/slashdot") //Specify "label" plus URL to RSS feed
newsfeed.displayoptions("datetime snippet") //show the specified additional fields
newsfeed.setentrycontainer("p") //Display each entry as a paragraph
newsfeed.filterfeed(8, "date") //Show 8 entries, sort by date
newsfeed.init() //Always call this last
</script>
<br>

</body>
</html>


Heres the link to my page with (Googles own code example): Feeds (http://www.ubernova.org/feedme/feeds2.html)


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<LINK href="feeds.css" rel="stylesheet" type="text/css">

<script type="text/javascript" src="http://www.google.com/jsapi?key=ABQIAAAAi5cMY-BQfnw5SPk05OspFBRPLe-XmU7Xd4Nn_mOz3CYDK-EBXxToJI6OOF7DdgOU6d2TqBcvfenCwA"></script>
<script type="text/javascript">

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

function initialize() {
var feedControl = new google.feeds.FeedControl();
feedControl.setLinkTarget(google.feeds.LINK_TARGET_BLANK);
feedControl.setNumEntries(200);
feedControl.addFeed("http://www.theregister.co.uk/headlines.atom");
feedControl.addFeed("http://www.toptechnews.com/feed/rss/syndication.xml");
feedControl.addFeed("http://www.technewsworld.com/perl/syndication/rssfull.pl");
feedControl.addFeed("http://www.linuxinsider.com/perl/syndication/rssfull.pl");
feedControl.addFeed("http://rss.slashdot.org/Slashdot/slashdot");
feedControl.draw(document.getElementById("feedControl"));

}
google.setOnLoadCallback(initialize);

</script>
</head>

<body>
<div id="feedControl">Loading</div>

</body>
</html>


The code in the page is simply a cop n paste straight from your example with the exception of my own API KEY.

any help would be greatly appreciated!