title: How to force Facebook app to ask for permissions?
body: <p>I am using the following code to generate a Facebook login link:</p>
  
  <pre><code>&lt;?php
  try {
   include_once 'facebook_sdk_libs/facebook.php';
  } catch(Exception $o){
   echo '&lt;pre&gt;';
   print_r($o);
   echo '&lt;/pre&gt;';
  }
  // Create our Application instance.
  $facebook = new Facebook(array(
    'appId'  =&gt; APPID,
    'secret' =&gt; APPSECRET,
    'cookie' =&gt; true,
  ));
  
  $session = $facebook-&gt;getSession();
  
  function d($d){
   echo '&lt;pre&gt;';
   print_r($d);
   echo '&lt;/pre&gt;';
  }
  
  $fbme = null;
  // Session based graph API call.
  if ($session) {
   try {
    $uid = $facebook-&gt;getUser();
    $fbme = $facebook-&gt;api('/me');
   } catch (FacebookApiException $e) {
    //  d($e);   
   }
  }
  
  if($fbme){
   $logoutUrl = $facebook-&gt;getLogoutUrl();
  } else { 
   $loginUrl = $facebook-&gt;getLoginUrl(
    array('scope' =&gt;  'publish_stream')
   );
  }
  </code></pre>
  
  <p>It shows a screen where Facebook shows "Go to App" AND "Cancel". When I click "Go to App", it returns back to my page, but does not post on Facebook wall as I want.</p>
  
  <p>What do I need to change in this code to make Facebook ask and get the permission to "Post on Wall"?</p>