How to test Facebook Login on localhost with django ?

Facebook Login Process

In order to add “Connect with facebook” functionality ,at First You have to create a facebook Application from here

Now you have a Facebook “App ID/API Key” and “App secret” which are used for authentication process

The facebook application must be on a web domain and if you registered with “Heroku Apps” when you view your app on facebook you shall find your App Domain Field is set to “”

The main problem was to test the “Connect with facebook” feature with a localhost since facebook doesn’t allow developers to use localhost as their App Domain,so to fix this problem you have to do the following :

First you have to install python,and configure it’s system environment path if on windows

1-Sign up on pagekite with your name (e.g

2-download the pagekite client application from here

3-Navigate with your Terminal or cmd to the directory of the downloaded file then execute the following command on windows

python 8000

or just 8000


where 8000 is the port number and it’s 8080 by default

if everything went well,to test if everything is working, run your localhost server and then try to access your domain on page kite ( you shall access your localhost now from the domain

Now if you configured pagekite correctly

Edit you “App Domain” on facebook to “” and “Site Url” to “

And now you can test your application by deploying your app on your localhost and then open “” and test your application from there.

Configuration with Django

install Social-auth library from here then follow the documentation to configure the desired social authentications you need from here