This is very simple process for implement facebook login api. This is simple demo code which help you.
First create Facebook apps and this is URL which help you

This is full code which you paste your file and if you set live url then upload this live site then run this file

    // if you want to get response email,name then send email,name parameter
    function checkLoginState() {
        FB.api('/me?fields=id,email,name', function (response) {
            // if you want to insert facebook api response then use this code ajax section
                type: "POST",
                url: "localhost/fb_user_login.php", // if you want to update your fb information then use ajax, update your url
                data: {profile_name:, profile_email:, profile_id:},
                dataType: "text",
                success: function (response) {

    window.fbAsyncInit = function () {
            appId: '123456789', // update your api id
            cookie: true,  // enable cookies to allow the server
            xfbml: true,  // parse social plugins on this page
            version: 'v2.8' // use graph api version 2.8

    // Load the SDK asynchronously
    (function (d, s, id) {
        var js, fjs = d.getElementsByTagName(s)[0];
        if (d.getElementById(id)) return;
        js = d.createElement(s); = id;
        js.src = "";
        fjs.parentNode.insertBefore(js, fjs);
    }(document, 'script', 'facebook-jssdk'));


<fb:login-button scope="public_profile,email" onlogin="checkLoginState();">

if you face any problem then please inform me, i will try my best to help you.