Takes api_url POSTed to it and creates a media tweet in the stolenbikecity twitter account where the bike was stolen. Sends an email back to BikeIndex to tell the bike owner what happened and to retweet.
To get this to work locally you'll have to create an app on Twitter and add environmental variables OMNIAUTH_CONSUMER_KEY
and OMNIAUTH_CONSUMER_SECRET
.
Twitter doesn't accept http://localhost
as a callback url, so use http://127.0.0.1
- e.g. my callback url is http://127.0.0.1:3001/users/auth/twitter/callback
Stolen Bike Alerter now uses omniauth twitter and has an actual interface!
Authenticate with twitter using the site and you'll be able to manage your account yourself!
DEPRECATED - Legacy documentation for old accounts
-
Create the new account on twitter -- it has to have a unique email. Write the email and the password in the Google Doc.
-
While signed in to your new account, create a twitter app at apps.twitter.com. It should probably be called stolenbikesXXX if you want to keep with our naming theme.
-
In the Keys and Access Tokens tab you need the Consumer Key, Consumer Secret, and click on Generate Access Token and get the key and secret that that gives you as well.
-
Record the above values in the google doc.
-
Add the above values to the seeds file.
-
Log in to the heroku with 'heroku run rails c production' and add the above values to the twitter_accounts table (see seed file for the proper column names.)