Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / NewStats: 3,195,332 members, 7,957,879 topics. Date: Tuesday, 24 September 2024 at 10:56 PM |
Nairaland Forum / Science/Technology / Webmasters / Displaying Rss Feeds Easily Using Google Ajax Feed Api (7617 Views)
Rss Feeds, How To Get It On My Blog / Nigerian Stock Exchange Api, Rss Feeds & Widgets :: / Nigerian Rss News Feeds (2) (3) (4)
Displaying Rss Feeds Easily Using Google Ajax Feed Api by Nobody: 2:07am On Jan 08, 2009 |
Displaying RSS feeds easily using Google Ajax Feed API Displaying RSS feeds from other sites (ie: CNN or Digg) on your own is a nice way to show constantly updated content automatically. However, for the novice web developer, setting this up can be daunting, requiring both knowledge from you and your server's ability to host remote files. Google's Ajax Feed API changes all that, by basically enabling any webmaster to display RSS feeds on their sites using some JavaScript code. It hosts the desired RSS feeds on their servers for you, caches them, and returns the data in either JSON or XML format for you to utilize. All that's left is for you to use some JavaScript to parse this data and output it on your page. In this tutorial, I'll show you how to harness Google Ajax Feed API to fetch a RSS feed and display it on your site. Let's do a simple one: index.html
rssdisplayer.js
Get your own google key to replace the one i used. The result will be shown below. I will not bother myself to explain how the rss class work. And by the way, do not mistaken that prototype u are seeing with the jquery prototype framework - this one here is the generic prototype we use in javascript to create classes. A brief explanation is that - there are 2 scripts involves, our own rss display class, and the external google ajax engine. To learn more about this technique, please follow this link: http://www.javascriptkit.com/dhtmltutors/googleajaxfeed.shtml Anything, you do not understand - just bring it here - i will explain as best as i can.
|
Re: Displaying Rss Feeds Easily Using Google Ajax Feed Api by Nobody: 2:11am On Jan 08, 2009 |
The 3 minute setup Because Google's Ajax Feed API takes care of the most gruelling work for you- fetching and hosting the desired RSS feeds to show, your job is merely to learn how to use JavaScript to access and display that information. Regardless of what you're trying to do with the resulting data, the core process is the same. Let me explain it in 3 simple steps: Step 1: Get your own (free) Google API key instantly, by going to their signup page, and entering your site's domain. A key that is super-duper-long is generated that will work only for that domain. Link to that is http://code.google.com/apis/ajaxfeeds/signup.html Step 2: Insert the following script in the HEAD section of your page, which first references Google Code API (required), then loads version 1 (currently the latest version) of Ajax Feed API:
Step 3: Now that you have access to Google Ajax Feed API on your page, all that's left is to use JavaScript to load the desired RSS feed, then retrieve and display the results in the desired manner. For example:
|
Re: Displaying Rss Feeds Easily Using Google Ajax Feed Api by Nobody: 9:47pm On Jan 08, 2009 |
Take a look at this: http://www.mwebng.net/rss Source code: index.html
rssdisplayer.js
|
Re: Displaying Rss Feeds Easily Using Google Ajax Feed Api by Nobody: 9:49pm On Jan 08, 2009 |
You will find the full tutorial on: http://www.javascriptkit.com/dhtmltutors/googleajaxfeed.shtml |
Re: Displaying Rss Feeds Easily Using Google Ajax Feed Api by switchmax8: 10:55am On Jan 09, 2009 |
Hello, Can you teach me the coding for rss feeds and how to display it on a webpage?if yes,send me the details to my email wealthyemah@yahoo.com and what it takes. |
Re: Displaying Rss Feeds Easily Using Google Ajax Feed Api by Nobody: 6:49pm On Jan 09, 2009 |
switchmax8: I am wondering if what you want to do is different from this one. Maybe you are tryin to create an rss feed for yourself, if that is the case just say so - maybe i can make a tutorial for that - problem is, i am never really idle - even these posts i make on nl - i make them while working - so for that reason - i dont do private tutorial - if u wish to learn - say so - if you are looking for a script then go to the script service thread and make your request. If you are looking for a complete solution, you can either download or pay me to do it for you - i think i am being more than fair? and you can contact me directly through www.contact.mwebng.net - i am still keeping my email address secret on NL - some ppl are hell bent on filling my box with obscenities - and they are nairalanders too (shameful) - luckily those were caught by my filters. |
Re: Displaying Rss Feeds Easily Using Google Ajax Feed Api by allimercy: 12:46am On Jan 12, 2009 |
I think this also has been simplified by Google when it acquired Feedburner recently. Go to feedburner.com( Now free) and insert your RSS url into it, you will have the html scripts that can be included to your web page and will be updated automatically from time to time. |
Re: Displaying Rss Feeds Easily Using Google Ajax Feed Api by Nobody: 1:53am On Jan 12, 2009 |
This one that google made too - it has a wizard somewhere that will help you to generate the stuff if you dont know how to code. I am here on NL to teach ppl wat i know best - and that is coding - which can solve ALL your problems if you know how to use it well. |
(1) (Reply)
How Does A Website Make Money From Hits? / 6 Mistakes That Can Kill Your Blog / It’s Amazing, Websites Can Now Accept Interswitch Payments Free!
(Go Up)
Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health religion celebs tv-movies music-radio literature webmasters programming techmarket Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10) Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 39 |