title: Facebook PHP SDK and Wordpress Error
body: <p>I have a developer environment setup with WAMP, Wordpress, and PHPEdit IDE. I use the Facebook, Twitter, and YouTube API's in a sidebar. I'm using Facebook's PHP SDK to display information(no login or admin functions). Since the FB SDK and WP use session_start() I get the following warning:</p>
  
  <blockquote>
    <p>Warning: session_start() [function.session-start]: Cannot send session
    cache limiter - headers already sent (output started at
    C:\wamp\www\dfi\wp-content\themes\DFI\header.php:12) in
    C:\wamp\www\dfi\wp-content\themes\DFI\api\facebook.php on line 36</p>
  </blockquote>
  
  <p>I'm trying to figure this out by using the warning output but it doesn't help considering the following. I know about clearing white space and characters before and after <code>&lt;?php ?&gt;</code> and placing session_start() before any http output. I use unix line enders and UTF8 encoding without BOM. My host server is not set up for output_buffering.</p>
  
  <p>header.php line 11 to 13</p>
  
  <pre><code>11 &lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
  12 &lt;html xmlns="http://www.w3.org/1999/xhtml" &lt;?php language_attributes();?&gt;&gt;
  13 &lt;head&gt;
  </code></pre>
  
  <p>It looks like the warning comes from inline php code. I don't know what I can do to fix this line.</p>
  
  <p>facebook.php line 34 to 37</p>
  
  <pre><code>34    public function __construct($config) {
  35    if (!session_id()) {
  36      session_start();
  37    }
  </code></pre>
  
  <p>I don't think I can stop either FB or WP from calling session_start() without breaking everything. How do I make Wordpress and Facebook play nicely together without this error?</p>
  
  <p>EDIT:
  To stop the warning from displaying I put @ in front of session_start().</p>
  
  <pre><code>public function __construct($config) {
      if (!session_id()) {
        @session_start();
      }
  </code></pre>
  
  <p>Its only a workaround and I would still like to find the root of the problem.</p>