title: How to get the user details from the facebook login?
body: <p>I am using facebook PHP SDK. I need the user to login to my site using their facebook account and I need to store their email, first name and last name in my database. I am using this code to login the user</p>
  
  <pre><code> $loginUrl   = $facebook-&gt;getLoginUrl(
          array(
              'scope'         =&gt; 'user_photos,user_videos,email,offline_access,publish_stream,user_birthday,user_location,user_work_history,user_about_me,user_hometown',
              'redirect_uri'  =&gt; $fbconfig['baseurl']
          )
  );
  </code></pre>
  
  <p>My problem is how can I retrieve the information after the user login and rediret back to my site.</p>