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!