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

https://developers.facebook.com/docs/facebook-login/web

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

<script>
    // 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
            $.ajax({
                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: response.name, profile_email: response.email, profile_id: response.id},
                dataType: "text",
                success: function (response) {
                    window.location.reload();
                }
            });
        });
    }

    window.fbAsyncInit = function () {
        FB.init({
            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);
        js.id = id;
        js.src = "https://connect.facebook.net/en_US/sdk.js";
        fjs.parentNode.insertBefore(js, fjs);
    }(document, 'script', 'facebook-jssdk'));

</script>

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

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