I installed social-auth-app-django and followed the guide here to integrate Facebook login to django 1.8.18. The problem is when I go to "http://localhost:8000/social-auth/login/facebook/" I get below error
Can't Load URL: The domain of this URL isn't included in the app's domains. To be able to load this URL, add all domains and subdomains of your app to the App Domains field in your app settings.
Here is my settings.py file
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
import os
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
print (BASE_DIR)
SECRET_KEY = 'x220#z=kwd)kjiu#u+p$)v0lu+rspyosg+)l*k$ux9j)1h'
DEBUG = True
ALLOWED_HOSTS = ['localhost']
INSTALLED_APPS = (
...
'account',
'social_django', #social classes
)
MIDDLEWARE_CLASSES = (
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
'django.middleware.security.SecurityMiddleware',
'social_django.middleware.SocialAuthExceptionMiddleware',
)
ROOT_URLCONF = 'bookmark.urls'
TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [os.path.join(BASE_DIR, 'templates')],
'APP_DIRS': True,
'OPTIONS': {
'context_processors': [
'django.template.context_processors.debug',
'django.template.context_processors.request',
'django.contrib.auth.context_processors.auth',
'django.contrib.messages.context_processors.messages',
'social_django.context_processors.backends', # <--
'social_django.context_processors.login_redirect', # <--
],
},
},
]
WSGI_APPLICATION = 'bookmark.wsgi.application'
STATIC_URL = '/static/'
MEDIA_URL = '/media/'
MEDIA_ROOT = os.path.join(BASE_DIR,'media/')
from django.core.urlresolvers import reverse_lazy
LOGIN_REDIRECT_URL = reverse_lazy('dashboard')
LOGIN_URL = reverse_lazy('login')
LOGOUT_URL = reverse_lazy('logout')
AUTHENTICATION_BACKENDS = (
'social_core.backends.facebook.FacebookOAuth2', #< --facebook
'django.contrib.auth.backends.ModelBackend',
'account.authentication.EmailAuthBackend',
)
SOCIAL_AUTH_FACEBOOK_KEY='1742581762468139'
SOCIAL_AUTH_FACEBOOK_SECRET='eae7dsfdsfdsf90b219becb84'
urls.py file
from django.conf.urls import include, url
from django.contrib import admin
from django.conf import settings
from django.conf.urls.static import static
urlpatterns = [
url(r'^admin/', include(admin.site.urls)),
url(r'^social-auth/',include('social_django.urls', namespace='social')), # <-- social facebook
url(r'^account/',include('account.urls')),
url(r'^$','account.views.dashboard',name="dashboard"),
]
if settings.DEBUG:
urlpatterns += static(settings.MEDIA_ROOT,
document_root=settings.MEDIA_ROOT)
Here is Facebook developer-app settings details screenshot

I also changed localhost to something like "bookmarks.com" and changed it in /etc/hosts file but got same error 