I am using Facebook Login Button to integrate with facebook in my website. But, I don't know how to save the username etc(userdata on facebook) from facebook to my database on login through facebook . How this can be done ?
Currently, when clicking the facebook login button an window is opened, we can enter the facebook username and password and it will be connected.
How to enter into php part while login to store user datas on facebook and if already exist login to site without store any data ?
<div id="fb-root"></div>
<script>(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js.src = "//connect.facebook.net/en_US/all.js#xfbml=1&appId=987654321";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
// facebook login button
<div class="fb-login-button" data-show-faces="false" data-width="200" data-max-rows="1" ></div>