Closed anderflash closed 8 years ago
Do you have a directory or file in your own project called "social"?
No, and it works with Facebook, but not with Google
I don't think you'll get much help on here as the backend does exist and you haven't given much information to go on... You could try python manage.py shell
and run from social.backends.google import GoogleOAuth2
and see what it says.
I've found the problem. There is a mistake in the book. They suggest adding this to the template:
<li class="google"><a href="{% url "social:begin" "google" %}">Login
with Google</a></li>
Change google by google-oauth2:
<li class="google"><a href="{% url "social:begin" "google-oauth2" %}">Login
with Google</a></li>
So the backend for Google (by using OAuth2) is registered as google-oauth2.
Thanks
hey anderflash, i'm going through the same book (Django by Example) and encountered the same Backend not found
error. I did what you suggested changing from google
to google-oauth2
in the login template, and I also used the 'social.backends.google.GoogleOAuth2'
in settings.py, but I'm still getting the error. How did you resolve your issue? Thanks
Thanks for @anderflash , i solved this problem according to your suggestion.
@anderflash :+1: Got my OAuth login ironed out thanks friend
Yep i had the same problem thanks for posting.... One thing i have noticed is that if i click edit profile it throws an error does everyone else get this or have i missed something. That is once you have logged in with the social accounts. Its because a profile doesn't exist yet.
Just for the record: it's 'social_core.backends.google.GoogleOAuth2' now (social-auth-app-django 1.1.0, social-auth-core 1.2.0).
Thank you! @anderflash, I also encountered this problem and solved by your suggestion.
Umm i m having problem with facebook someone please help me iut
@rashmitpankhania
FacebookOAuth2
<a href="{% url "social:begin" "facebook" %}">Facebook</a>
FacebookAppOAuth2
<a href="{% url "social:begin" "facebook-app" %}">Facebook</a>
I try to follow the Book "Django By Example" (Chapter 04) with Django 1.9 and Python 3.5.1, but when I try the google login, it doesn't work. I put just
'social.backends.google.GoogleOAuth2',
, but the debug says:Backend not found
.What am I doing wrong? Thanks