title: facebook access_token clarification
body: <p>I have an facebook app that is supposed to send some notifications to its users. This will be done by a cron, and I found two ways to get the <code>access_token</code> needed to perform this action:</p>
  
  <p>1.</p>
  
  <pre><code>$app_token = file_get_contents("https://graph.facebook.com/oauth/access_token?" .
      "client_id=" . appid .
      "&amp;client_secret=" . secret .
      "&amp;grant_type=client_credentials");
  </code></pre>
  
  <p>2.</p>
  
  <pre><code>$fb = new Facebook(array('appId' =&gt; appid, 'secret' =&gt; secret, 'cookie' =&gt; true));
  $app_token = $fb-&gt;getAccessToken(),
  </code></pre>
  
  <p>I can understand that there are two different ways to get the <code>access_token</code>, but <strong>why do I get different values</strong> from the two methods? [both work just the same as far as I've noticed]</p>
  
  <p>I want to know what the diference is and what is the best method to get an <code>access_token</code>.</p>