To add your own facebook login system to the script you need to create an facebook app. for that follow below steps
Step 01:
login to your facebook and go to https://developers.facebook.com.
Step 02:
now click on my apps button
Step 03:
now click on create app
Step 04:
select app type, select consumer and click continue
Step 05:
give info for your app
Step 06:
now go to facebook login settings area
Step 07:
now you have to setup your facebook callback url, your facebook login call will yourdmain.com/facebook/callback, do not forget to change your actual domain with yourdomain.com
Step 08:
now go to settings > basic settings
Step 09:
add your app domain and your email, remember your app domain must be your website url.
Step 10:
add platform select website
Step 11:
add website url to Platform
Step 12:
now you have to add your facebook app id and app secret to your website admin panel, for this go to “General Settings > third party scripts”
if facebook login is not enable, then enable it and add facebook app id and app secret
that’s it, facebook login setup is done.