I need help pulling RSS feeds from a facebook page. I use the following code, but it continues to give me an error:
string url = "https://www.facebook.com/feeds/page.php?id=40796308305&format=rss20"; XmlReaderSettings settings = new XmlReaderSettings { XmlResolver = null, DtdProcessing=DtdProcessing.Parse, }; XmlReader reader = XmlReader.Create(url,settings); SyndicationFeed feed = SyndicationFeed.Load(reader); foreach (var item in feed.Items) { Console.WriteLine(item.Id); Console.WriteLine(item.Title.Text); Console.WriteLine(item.Summary.Text); } if (reader != null) reader.Close();
This code works fine with any blog or rss page, but using Facebook rss it throws an exception with the following post
An element named 'html' and namespace 'http://www.w3.org/1999/xhtml' is not a valid feed format.
thanks
source share