title: How to get Users Email Id in Facebook application using PHP?
body: <p>I have created a simple Facebook application in PHP, that greets user by there user name,
  I also want there Email id, to be displayed. But i am not able to do that. the code that i am using is,</p>
  
  <pre><code>require_once('facebook.php');
  require_once('config.php');
  $facebook = new Facebook(APIKEY, SECRETKEY);
  $user=$facebook-&gt;require_login();
  
  echo $user; // displaying the ID
  &lt;div style="padding: 10px;" id="greeting"&gt;
     &lt;fb:if-is-app-user uid="loggedinuser"&gt;
        &lt;h2&gt;Hi &lt;fb:name firstnameonly="true" uid="loggedinuser" useyou="false"/&gt;! welcome to facebook&lt;/h2&gt;
    &lt;fb:else&gt;
         &lt;h2&gt;Hi &lt;fb:name firstnameonly="true" uid="loggedinuser" useyou="false"/&gt;! welcome to facebook&lt;/h2&gt;
     &lt;/fb:else&gt;
     &lt;/fb:if-user-has-added-app&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>the Output that i am getting is,</p>
  
  <pre><code>1000002020202020
  Hi User! welcome to facebook
  </code></pre>
  
  <p>I want the Email address to be displayed along with the user name, i searched many code but did not get any solution. and if you any good facebook tutorial site please post the links too..</p>