Claudius
13 years agoBoss
Include RSS feed information from another site into custom component
I'd like to show an RSS feed (or alternatively even JSON) from another domain within a Lithium Custom component, but keep running into severla issues which I blame cross site scripting prevention a.k.a. "same origin policy" for.
Anyone got a working solution for that use case?
Here's what's not working for me right now using a wrapper to create a JSONP out of the original XML feed at http://share.skype.com/stats_rss.xml :
<@liaAddScript> var jqxhr = LITHIUM.jQuery.ajax({ url: "http://ajax.googleapis.com/ajax/services/feed/load?v=1.0&q=http://share.skype.com/stats_rss.xml&output=json_xml&callback=ShowUserCount", Type:"GET" , dataType:"jsonp", contentType: "application/json" }) .done(function() { alert("success"); }) .fail(function(xhr, status, error) { alert("Error: " + error + "(" + status + ") - Details: " + xhr.status + " \nxhr.responseText: " + xhr.responseText); }); </@liaAddScript>