title: Cannot get a session with Facebook app? (using its Graph API)
body: <p>I have really simple few lines of Facebook app, using the new Facebook API:</p>
  
  <pre><code>&lt;pre&gt;
  
  &lt;?php
  
  require 'facebook.php';
  
  // Create our Application instance.
  $facebook = new Facebook(array(
    'appId'  =&gt; '117676584930569',
    'secret' =&gt; '**********',                 // hidden here on the post...
    'cookie' =&gt; true,
  ));
  
  var_dump($facebook);
  
  ?&gt;
  </code></pre>
  
  <p>but it is giving me the following output:</p>
  
  <p><a href="http://apps.facebook.com/woolaladev/i2.php" rel="nofollow noreferrer">http://apps.facebook.com/woolaladev/i2.php</a>    would give out</p>
  
  <pre><code>object(Facebook)#1 (6) {
    ["appId:protected"]=&gt;
    string(15) "117676584930569"
    ["apiSecret:protected"]=&gt;
    string(32) "**********"                   &lt;--- just hidden on this post
    ["session:protected"]=&gt;
    NULL                                      &lt;--- Session is NULL for some reason
    ["sessionLoaded:protected"]=&gt;
    bool(false)
    ["cookieSupport:protected"]=&gt;
    bool(true)
    ["baseDomain:protected"]=&gt;
    string(0) ""
  }
  </code></pre>
  
  <p>Session is NULL for some reason, but I am logged in and can access my home and profile and run other apps on Facebook (to see that I am logged on).</p>
  
  <p>I am following the sample on:</p>
  
  <p><a href="http://github.com/facebook/php-sdk/blob/master/examples/example.php" rel="nofollow noreferrer">http://github.com/facebook/php-sdk/blob/master/examples/example.php</a><br>
  <a href="http://github.com/facebook/php-sdk/blob/master/src/facebook.php" rel="nofollow noreferrer">http://github.com/facebook/php-sdk/blob/master/src/facebook.php</a></p>
  
  <p>(download using raw URL:  wget  <a href="http://github.com/facebook/php-sdk/raw/master/src/facebook.php" rel="nofollow noreferrer">http://github.com/facebook/php-sdk/raw/master/src/facebook.php</a> )</p>
  
  <p>Trying on both hosting companies at dreamhost.com and netfirms.com, and the results are the same.</p>