I don’t normally write specific “tutorial” type posts like this on my blog, but during a recent project I had to add functionality that read feeds from a variety of sources, including RSS, Twitter, Youtube, and Facebook. If you’ve ever read any type of XML feed via PHP reading most of these feeds are easy, and there’s nothing new to it. (If not, it’s pretty simple and there are tons of tutorials online.) However, when I got to the Facebook feed, I ran into endless trouble.
Simply plugging in a Facebook update feed (from a page) to my normal feed reading script didn’t work. Looking at the source of the feed, it was standard XML, and no different from reading any other type of XML. I looked closer into the Facebook-specific feed tags, altered my code time after time, and to no avail.