title: Notifications API with PHP SDK
body: <p>I am trying to send notification to one of my users (https://developers.facebook.com/docs/app_notifications/) but I can't manage to get this work with my PHP SDK.</p>
  
  <p>I am using this code:</p>
  
  <pre><code>$data = array(
      'href'=&gt; 'https://apps.facebook.com/MY_APP/',
      'access_token'=&gt; $app_token,
      'template'=&gt; 'test'
  );
  $sendnotification = $facebook-&gt;api('/USER_ID/notifications', 'post', $data);
  </code></pre>
  
  <p>And this is what error I get back:</p>
  
  <blockquote>
    <p>Fatal error: Uncaught OAuthException: Invalid OAuth access token
    signature. thrown in /usr/home/test/base_facebook.php on line 1039</p>
  </blockquote>
  
  <p>This is how I get app access token:</p>
  
  <pre><code>$APPLICATION_ID = "MY_APP_ID";
  $APPLICATION_SECRET = "MY_APP_SECRET";
  
  $token_url =    "https://graph.facebook.com/oauth/access_token?" .
                  "client_id=" . $APPLICATION_ID .
                  "&amp;client_secret=" . $APPLICATION_SECRET .
                  "&amp;grant_type=client_credentials";
  $app_token = file_get_contents($token_url);
  </code></pre>
  
  <p>What am I doing wrong?</p>
  
  <hr>
  
  <p>There was a problem with access_token, if I use access token directly in sode it now works.</p>
  
  <pre><code>'access_token'=&gt; 'K3Rds2y0cGm...',
  </code></pre>
  
  <p>Does anyone knows how long app access token lasts?</p>