:squirrel: Stalking @wesbos on Twitter for Stickers
If you are like me, you love Wes Bos - he is Boss
Well, be denied no more.
This app combines a little twitter stalking with some twilio sms magic.
Everytime a new tweet from @wesbos includes the term 'sticker', this app will send me an SMS.
I have set up calls to the twitter REST API once per hour looking for new tweets. If a new tweet is found that meets my query, me phone in me pocket will start a-buzzing.
How can you install this yourself?
- Set up an app in twitter by going to https://dev.twitter.com, get your consumer key, consumer secret, access tokey key, and access token secret.
- When I set this up on my local machine, I save my keys to a file named
config.js
and import it into my main file. When deploying, you will save all your keys as environment variables.
- When I set this up on my local machine, I save my keys to a file named
- Get a twilio dev account by going to https://www.twilio.com/, get your Account SID and Auth Token, which you will also save in
config.js
and later as environment variables, then purchase your first phone number, which only runs $1/month and charges you only a penny to send a message. - Fork and clone this repo, then run
npm install
oryarn
if you use yarn. - Use your favorite host to deploy. Currently, the
package.json
andProcfile
are set up for a worker to run on Heroku.
Update Regarding Heroku Deployment && Data Persistence.
On a local machine, using the built-in fs
node-module is an easy way to manage data persistence. However, when deploying to heroku, I found that this system would not work.
Therefore I refactored my code for data persistence with MongoDB, and utilized the mLab MongoDB :: Mongodb
add-on.