title: Facebook php app, req_perms
body: <p>I am trying to make a small facebook application with php &amp; facebook PHP API. I need to give a permissions to post status, etc. But it is doesn't work. Here is my code:</p>
  
  <pre><code>&lt;?php
  require './src/facebook.php';
  $facebook = new Facebook(array(
    'appId'  =&gt; '###',
    'secret' =&gt; '###',
  ));
  
  $user = $facebook-&gt;getUser();
  
  if ($user) {
  if ($user) {
    $logoutUrl = $facebook-&gt;getLogoutUrl();
    echo "&lt;a href='$logoutUrl'&gt;Logout&lt;/a&gt;";
  } else {
    $loginUrl = $facebook-&gt;getLoginUrl(array(
         'req_perms' =&gt; 'publish_stream,read_friendlists,email'   
    ));
    echo "&lt;a href='$loginUrl'&gt;Login with Facebook&lt;/a&gt;";
  }
  
  ?&gt;
  </code></pre>
  
  <p>When i click on Login url do not get permissions (publish_stream,read_friendlists,email). I see only "Logging in will not add this app's activity to Facebook."</p>