Django-allauth No Facebook app configured: please add a SocialApp using the Django admin
The problem could be with your database. Think you need to synchronize the Database.
DO
python manage.py syncdb
if that does not work, make sure the Site
which you added your facebook app to has the domain localhost:8000
if you are using localhost or 127.0.0.1:8000
if you are using 127.0.0.1:8000
For more information go through this allauth tutorial.
UPDATE
you could also try removing the example.com
site from the admin and add a new site that uses localhost:8000
or 127.0.0.1:8000
and add the facebook social app under the new site. Also, do not forget to set the SITE_ID
variable in your settings.py
file.
I had the same issue here and the problem was the SITE_ID, which is 1 by default. However, 1 is assigned to the example site that comes by default when you see the admin panel. After creating my site for configuring a Facebook login, I replaced the SITE_ID=2 in settings.py and it worked. Another option is to delete the example site, but it will appear again if at some point you delete your db and create it again.
This took me like 3 hours until I realized... :S
I had the same problem and I think some explanation will help others: django-allauth uses django-sites which can make it very confusing.
It's very easy to accidentally add sites when you are configuring your social app.
To get things working, you need to make sure that the SITE_ID in your settings matches the domain that you've enabled in your facebook app and selected in the social app on the django back end. If the site specified in any one of these three locations is wrong, you'll get the 'ImproperlyConfigured...' error.
If, like me, you got it all messed up from the start, do this to get facebook authentication working:
- Go to your facebook app and record the 'Site URL' - This is the only
site your facebook app will authenticate. For testing I'm using
'
http://localhost:8000
'. Call this mysite. - Go to your facebook social app in django admin and make sure you've got mysite as the only site in 'chosen sites'. Add it using admin/sites if it's not on the list.
- Go to admin/sites and delete anything that should not be there.
- Use phpmyadmin or some such to look at your django_site table and record the site_id for mysite.
- Update your settings so that SITE_ID is set to the mysite id.
run your server and facebook authentication should work.