title: SDK 4.0 Facebook, no dialog to request permission publish_actions
body: <p>I created an app on facebook and via PHP SDK 4.0 I created the login and I need to have write permissions on the feed, but even we have added the permissions, when I do not log apparre the more window box to approve and grant permissions . </p>
  
  <p>this is the code used:</p>
  
  <pre><code>&lt;?php session_start(); 
  require 'Facebook/autoload.php'; 
  
  
  
  
  use Facebook\FacebookSession; 
  use Facebook\FacebookRequest;
  use Facebook\GraphObject;
  use Facebook\FacebookRequestException;
  use Facebook\FacebookRedirectLoginHelper;
  
  
  
  // init app with app id (APPID) and secret (SECRET)
  FacebookSession::setDefaultApplication('XXXXXXXXXX XXXXXXXX','XXXXXXXXXXXXXXXXXX');
  
  // login helper with redirect_uri
  $helper = new FacebookRedirectLoginHelper( 'XXXXXXXXXXXXX' );
  
  try {
  $session = $helper-&gt;getSessionFromRedirect();
  } catch( FacebookRequestException $ex ) {
  // When Facebook returns an error
  } catch( Exception $ex ) {
  // When validation fails or other local issues
  }
  
  // see if we have a session
  if ( isset( $session ) ) {
  // graph api request for user data
  $request = new FacebookRequest( $session, 'GET', '/me' );
  $response = $request-&gt;execute();
  // get response
  $graphObject = $response-&gt;getGraphObject();
  
  // print data
  echo print_r( $graphObject, 1 );
  
  
  
  
  
  
  if($session) {
  
  
  try {
  
  
  $response = (new FacebookRequest(
  $session, 'POST', '/me/feed', array(
  'link' =&gt; 'www.example.com',
  'message' =&gt; 'User provided message'
  )
  ))-&gt;execute()-&gt;getGraphObject();
  
  
  echo "Posted with id: " . $response-&gt;getProperty('id');
  
  
  } catch(FacebookRequestException $e) {
  
  
  echo "Exception occured, code: " . $e-&gt;getCode();
  echo " with message: " . $e-&gt;getMessage();
  
  
  } 
  
  
  }
  
  
  
  
  } else {
  
  $params = array(
  scope =&gt; 'publish_actions'
  //redirect_uri =&gt; $url
  );
  // show login url
  echo '&lt;a href="' . $helper-&gt;getLoginUrl($params) . '"&gt;Login&lt;/a&gt;';
  }
  ?&gt;
  </code></pre>