title: DOM to parse Facebook wall
body: <p>I am trying to parse messages from a public Facebook fan page wall, but it returns a blank page.</p>
  
  <pre><code>$source = "http://www.facebook.com/?sk=wall&amp;filter=2";
  libxml_use_internal_errors(TRUE);
  $dom = new DOMDocument();
  $dom-&gt;loadHTML($source);
  $xml = simplexml_import_dom($dom);
  libxml_use_internal_errors(FALSE);
  $message = $xml-&gt;xpath("//span[@class='messageBody']");
  
  return (string)$message[0] . PHP_EOL;
  </code></pre>