title: how does facebook login and register api works
body: <p>I have a site with custom login and register option which asks username, password, email, dob, gender.</p>
  
  <p>Now, what i want is to add Facebook login page for my website. and if user allow to share his information with my site then it will retrieve these general information from it and then show the status of login. And also, if user already login to Facebook then it will show his status instead of Facebook Login Button.</p>
  
  <p>I doesn't know how this API works and how to code it. I'm using php and MySQL for my website.</p>