As we all know, Twitter goes down very frequently. Twitter has released a useful tool to inform users about outages, planned or otherwise, but this is no help to the many websites that syndicate their Twitter feeds.
Too often the script that is pulling the Twitter feed triggers an error that can take down the entire page. One of the common culprits is the XML parser, such as DOMDocument. When Twitter goes down, all status feeds return the infamous “Fail Whale” HTML. This, of course, does not validate as XML and causes the parser to throw an error.
The best method to deal with this is to wrap all XML parsing in try/catch blocks and cache the Twitter feed. If Twitter goes down, you can display the cached copy of the feed.
This is good advice for anytime you find yourself syndicating a feed.