Tuesday, July 31, 2012

django-allauth and signup or login via twitter?

I am trying to work with django-allauth. I followed the instructions at github page and done following:

1. Added allauth urls into urls.py

urlpatterns += patterns ('',
    url('^accounts/', include('allauth.urls')),
    url('^accounts/profile/$', ProfileView.as_view(), name='ProfileView'),
    url('^login/$', login, name='account_login'),
    url('^logout/$', logout, name='account_logout'),
    url('^login/cancelled/$', login_cancelled, name='socialaccount_login_cancelled'),
    url('^login/error/$', login_error, name='socialaccount_login_error'),
)

2. Updated TEMPLATE_CONTEXT_DIRS, TEMPLATE_CONTEXT_PROCESSORS, AUTHENTICATION_BACKENDS and INSTALLED_APPS. Also added ACCOUNT_AUTHENTICATION_METHOD = "username_email"

3. Added Key and Secret for twitter in the Social apps table.

4. Copied django-allauth templates to my app's directory and modified it. I can see all the templates working fine like /accounts/signup/ and /accounts/social/connections/.

Now, from connections or signup when I click Twitter link /accounts/twitter/login/ I ended up with the following error:

Social Network Login Failure
An error occured while attempting to login via your social network account.

Am I missing something? Did anybody ever try to login or sign up using twitter? I tried to search for all solution on the web but was not able to find any. If this thing doesn't work then I would like to try django-social-auth.

Thanks in advance.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/t2PaUkNqN4QJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

No comments:

Post a Comment