0

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> 
  1. 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', } }

Abhi.Rathore
  • 85
  • 2
  • 8
  • 1
    Possible duplicate of [Django: SocialApp matching query does not exist](http://stackoverflow.com/questions/15409366/django-socialapp-matching-query-does-not-exist) – Glenn Sep 01 '16 at 17:32
  • In my case it's working fine on the localhost , however it doesn't work as desired on the pythonanywhere hosting platfrom – Abhi.Rathore Sep 02 '16 at 15:31
  • That's because you have the entry in the database on your machine and not on PythonAnywhere – Glenn Sep 04 '16 at 10:15
  • Is there a particular entry that you are referring to? Because I have already done the required settings in admin console on pythonanywhere too(i.e. social account, social application and site id etc) – Abhi.Rathore Sep 05 '16 at 09:55

0 Answers0