2
votes

I'm building a web app (using Django) in which I need to use OAuth. I'm using Tweepy and have installed and imported it. I now have no idea to set it up so that when a user hits the "Submit" button on my form, they are asked to Log in via Twitter. I have followed a number of different tutorials/blogs to try and get it working but I can't seem to crack it.

This is the flow I am after:

  • User submits a message using the form
  • User is asked to authenticate Twitter account
  • Message from the form and Twitter details (@username, screen name, profile pic etc) are stored in database (using SQLite3)
  • User is redirected to index.html where they see the message they submitted in a Twitter-like feed of "Latest messages".

I'm really stuck so any help would be much appreciated!

1

1 Answers

1
votes

I tried to do the same thing, in addition to that, the form content is automatically twitted to user wall.

You need to follow the tutorial here

http://packages.python.org/tweepy/html/auth_tutorial.html#oauth-authentication