This project has moved. For the latest updates, please go here.

Facebook Feeds: Expected DTD markup was not found

Topics: User Forum
Oct 9, 2007 at 3:56 AM
Edited Oct 9, 2007 at 2:12 PM
So I'm trying to consume a facebook status feed and am not having any luck. On the back-end I'm just doing:

RssDocument rss = RssDocument.Load(facebookfeedurl);
string output = rss.ToXml(DocumentType.Atom).ToString();

On the loading, I get the error: "Expected DTD markup was not found." Has anyone seen this before and can anyone offer some suggestions?

Thanks,
Brian
Oct 14, 2007 at 3:49 PM

Citezein wrote:
So I'm trying to consume a facebook status feed and am not having any luck. On the back-end I'm just doing:

RssDocument rss = RssDocument.Load(facebookfeedurl);
string output = rss.ToXml(DocumentType.Atom).ToString();

On the loading, I get the error: "Expected DTD markup was not found." Has anyone seen this before and can anyone offer some suggestions?

Thanks,
Brian

OK, I found out that Facebook does browser sniffing on all http requests, even for their feeds. As a result, the feed wasn't being returned. Instead, the contents of http://www.facebook.com/browser.php were being sent, which is obviously not a feed. While this is horrible practice, the toolkit should have some way of setting the User-Agent string so we can work around sites such as this. I'll file a feature request.