-- restructuredtext --
A Django application that lets you associate Twitter accounts with your User accounts.
Features include:
- Uses django.contrib.auth.User
- Lets Twitter users sign in before registering.
- Optional auto-creation of Users from Twitter screen-names
- Lets Users link and unlink Twitter accounts.
- Python 2.5 or higher
- oauth - http://pypi.python.org/pypi/oauth/
- oauth-python-twitter - http://code.google.com/p/oauth-python-twitter/
- python-twitter - http://pypi.python.org/pypi/python-twitter/
- simplejson - http://pypi.python.org/pypi/simplejson/
Get a Twitter OAuth Client from http://twitter.com/oauth_clients.
Add your
TWITTER_CONSUMER_KEY
andTWITTER_SECRET_KEY
tosettings.py
.Add
django_oauth_twitter
tosettings.INSTALLED_APPS
.Add
django_oauth_twitter.context_processors.twitter_userinfo
tosettings.TEMPLATE_CONTEXT_PROCESSORS
.Add
django_oauth_twitter.middleware.SessionMiddleware
tosettings.MIDDLEWARE_CLASSES
after yourAuthenticationMiddleware
.Add the following to your
urls.py
:from django_oauth_twitter.views import OAuthTwitter oauthtwitter = OAuthTwitter() urlpatterns += patterns('', (r'^twitter/', include(oauthtwitter.urls)) )
Add a link to
{% url twitter_signin %}
from yoursettings.LOGIN_URL
page. (See http://apiwiki.twitter.com/Sign-in-with-Twitter for some nice buttons.)Try it out!
- Please submit all bugs and patches to:
- http://bitbucket.org/akoha/django-oauth-twitter/