title: Enabling email permission acquiring when making a Facebook login on my website
body: <p>I'm trying to get Name and Email information about the user that connects to my site with Facebook Login.</p>
  
  <p>I've looked in this article and i've made the written step:</p>
  
  <p><a href="https://stackoverflow.com/questions/15481784/facebook-api-email-permissions">facebook api email permissions</a></p>
  
  <p>Then i went to my Application section in my profile and i've made a call to the Graph API specifying my email address too, then i went back to my website and i've made a login:</p>
  
  <p>My name and my email address were displayed.</p>
  
  <p>But if another user goes to the same webpage and makes the login, only his/her name is being displayed and not his/her email address.</p>
  
  <p>Here i attach you the code that i'm using to</p>
  
  <pre><code>include ('php-sdk/facebook.php');
  
  $config = array();
  $config['appId'] = FB_APP_ID;
  $config['secret'] = FB_APP_SECRET;
  $config['fileUpload'] = false;
  $config['cookie'] = true;
  
  $facebook = new Facebook($config);
  
  $user_id = $facebook-&gt;getUser();
  
  if ($user_id) {
      try {
          $user_profile = $facebook-&gt;api('/me','GET');
          echo "Name: " . $user_profile["name"];
          echo "Email: " . $user_profile["email"];
          $logout_url = $facebook-&gt;destroySession();
          echo '&lt;a href="'.$logout_url.'"&gt;Effettua il logout&lt;/a&gt;';
      } catch (FacebookApiException $e) { // try
          $login_url = $facebook-&gt;getLoginUrl(array('scope'=&gt;'email'));
          echo 'Please &lt;a href="'.$login_url.'"&gt;login.&lt;/a&gt;';
          error_log($e-&gt;getType());
          error_log($e-&gt;getMessage());
      } /*catch*/
  } else {
      $login_url = $facebook-&gt;getLoginUrl();
      echo 'Please &lt;a href="'.$login_url.'"&gt;login.&lt;/a&gt;';
  }
  </code></pre>
  
  <p>Which points am i missing?</p>
  
  <p>Thanks a lot</p>