Django-facebook
Django-facebook copied to clipboard
ValueError thrown because context.get('FACEBOOK_APP_ID') returns none
I'm running Django 1.6 and I just upgraded to django_facebook 6.0.1 (in an attempt to fix this issue). However, when I try to connect to facebook/connect, it throws an ValueError with the message "Please specify a Facebook app id and ensure the context processor is enabled". I dug into the code a bit and it appears that context.get('FACEBOOK_APP_ID') returns none. I tried separately to run this (in my own view) and also got 'none'.
I have the settings.py setup as you described in your documentation: 'django_facebook.auth_backends.FacebookBackend' -> AUTHENTICATION_BACKENDS 'django_facebook.context_processors.facebook' -> TEMPLATE_CONTEXT_PROCESSOR 'django_facebook' -> INSTALLED_APPS FACEBOOK_APP_ID and FACEBOOK_APP_SECRET are both defined in settings.py.
Please let me know if you have any suggestion. Thanks.
+1
+1
+1
Same problem here Any idea?
+1
+1
+1
+1
+1
+1
Dude I'm f'cking dying here.
Django made changes to the how TEMPLATES are configured in settings.py. Please refer to https://docs.djangoproject.com/en/1.8/ref/templates/upgrading/#the-templates-settings You'll have to migrate these changes to your settings for the Django-Facebook to work.
Try the following change..
TEMPLATES = [ { 'BACKEND': 'django.template.backends.django.DjangoTemplates', 'DIRS': [], 'APP_DIRS': True, 'OPTIONS': { 'context_processors': [ 'django.template.context_processors.debug', 'django.contrib.auth.context_processors.auth', 'django.contrib.messages.context_processors.messages', 'django.contrib.auth.context_processors.auth', 'django.template.context_processors.debug', 'django.template.context_processors.i18n', 'django.template.context_processors.media', 'django.template.context_processors.static', 'django.contrib.messages.context_processors.messages', 'django.template.context_processors.facebook', 'django.template.context_processors.request', ], }, }, ]
i use django.allauth now for facebook log in, which works fine