-
Notifications
You must be signed in to change notification settings - Fork 0
Twitter Integration
barleyboard:hopstar
/broadcast/twitter/get/1/
I need the twitter REST API https://dev.twitter.com/docs/api I need to make an app called broadcast In it it will be a function to send tweets from an users twitter account. So I need a way for a user to hook up there accounts, this will require a view and some templates and a twitter-account model.
Twitter uses OAuth1.0a. I need to read this document https://dev.twitter.com/docs/auth/oauth
I am using dev authenitcation now and will have to move up to 3-legged authentication later. I went to dev.twitter.com and added barleyboard as an application. This gave me the consumer_key and the consumer_secret. I still need the access_token_key and access_token_secret. I am supposed to run get_access_token.py but I can't find it.
I found a copy of the get_access_token.py from the python-twitter goolgle code repo here http://code.google.com/p/python-twitter/. I edited it and put my consumer_key and comsumer_secret. Then I ran it:
python get_access_token.py
This generated a URL I went to on twitter.com where I gave the barleyboard app permission to use my account. It returned a pin and then it gave me the token_key and token_secret.
Once an account has been established I will need to make a twitter feed to grab ll the messages sent to the user (@barleyboard) and a writing function so the users account can broadcast when a menu has changed. This would be a listener on the Menu model. I would need a way to turn a change event into a twitter text. Maybe a new_beers() function that compares a new menu item list to the previous menu item list and returns text containing the new menu items.
For no I need a view I can hit from Javascript and get a twitter update or none.