I am trying to implement facebook login using django allauth on pythonanywhere.com.The code I am using works fine on localhost. But the same set of code does not work on pythonanywhere. When I click on the "Facebook Oauth" hyperlink on the login page it takes me to facebook site on localhost.However when I do the same thing on pythonanywhere it gives me following error:
"DoesNotExist at /accounts/facebook/login/ SocialApp matching query does not exist."
Request your support in identifying the root cause.
1.login template :
{% load socialaccount %}
{% block content %}
<a href="{% provider_login_url "facebook" method="oauth2" %}">Facebook OAuth2</a>
settings.py file :
SITE_ID = 3 SOCIALACCOUNT_PROVIDERS = \ { 'facebook': { 'SCOPE': ['email', 'publish_stream'], #'METHOD': 'js_sdk' , 'METHOD': 'oauth2', 'LOCALE_FUNC': 'path.to.callable', #'LOCALE_FUNC': lambda request: return 'en-US', } }