I want to intergrate Flickr image into my Rss News aggregator site and I found out that I can use Google AJAX Feed API. Since google already provide the documentation and example for the API code I think it is my job to tweak it for Malayapark.com.
Code snippet
<html>
<head>
<script type=”text/javascript” src=”http://www.google.com/jsapi?key=”YOUR-KEY”></script>
<script type=”text/javascript”>
google.load(“feeds”, “1″);
var defaultUser = ‘wazari’;
function newSlideShow(user) {
showStatus(‘Resolving feed for ‘ + user);
var url = ‘http://www.flickr.com/photos/’ + user;
google.feeds.lookupFeed(url, lookupDone);
}
function lookupDone(result) {
if (result.error || result.url == null) {
showStatus(‘Could not locate feed for user’);
return;
}
showStatus(‘Found Photo Feed’);
// We need to switch over from Atom to RSS to get Yahoo Media for slideshow..
var url = result.url.replace(‘format=atom’, ‘format=rss_200′);
showSlideShow(url);
}
function showSlideShow(url) {
var options = {
displayTime: 2500,
transistionTime: 800,
scaleImages: true,
thumbnailTag: ‘content’,
linkTarget : google.feeds.LINK_TARGET_BLANK
};
new GFslideShow(url, “slideshow”, options);
}
google.setOnLoadCallback(function() {newSlideShow(defaultUser)});
</script>
</head>
<body>
<div id=”feedControl”>Loading</div>
</body>
</html>
Descriptions
(more…)
Tags:
ajax google slide show flikr,
cle google jsapi slideshow,
google feed api examples,
google feed api flickr,
google feed api slideshow flickr