Question:
How can I put this BBC NEWS feed on to my website?
Carl
2014-01-21 04:15:16 UTC
I've created a page on my website ready to implement the BBC NEWS feed. I'm new to web development so am not sure how I go about this. What do I need to do to implement the news feed rss into my webpage? I've found on the bbc site that it is possible -

http://www.bbc.co.uk/news/10628494

thank you so much.
Three answers:
?
2014-01-21 04:20:01 UTC
Google is your friend.



"How to add RSS feed to website"



The Feeds are on BBC's site and are different depending on which feed you want, the options to add it to your page are different depending on how you want it to show (icon, link, ticker etc).
2014-01-21 04:27:13 UTC
Adapted from....



https://code.google.com/apis/ajax/playground/#load_feed







/*

* How to load a feed via the Feeds API.

*/



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



// Our callback function, for when a feed is loaded.

function feedLoaded(result) {

if (!result.error) {

// Grab the container we will put the results into

var container = document.getElementById("content");

container.innerHTML = '';



// Loop through the feeds, putting the titles onto the page.

// Check out the result object for a list of properties returned in each entry.

// http://code.google.com/apis/ajaxfeeds/documentation/reference.html#JSON

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);

}

}

}



function OnLoad() {

// Create a feed instance that will grab Digg's feed.

var feed = new google.feeds.Feed("http://feeds.bbci.co.uk/news/world/rss.xml");



// Calling load sends the request off. It requires a callback function.

feed.load(feedLoaded);

}



google.setOnLoadCallback(OnLoad);​
Rebecca
2016-03-12 02:51:51 UTC
yeah your allowed, as long as you give credit to the bbc for the information.


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...