Based on the repo at flask_listen. Follow the installation instructions there.
You need an account on Cloudant and Twitter. Per Heroku's configuration recommendations, set the following keys in a .env file:
CLOUDANT_USER=...
CLOUDANT_PASS=...
CLOUDANT_DB=...
TWITTER_CONSUMER_KEY=...
TWITTER_CONSUMER_SECRET=...
TWITTER_ACCESS_KEY=...
TWITTER_ACCESS_SECRET=...
To get this onto Heroku:
heroku create {name of Heroku instance}
heroku config:push
git push heroku master
This might help: http://stackoverflow.com/questions/27899517/heroku-configpush-not-adding-environment-variables
Then, to start the listener, enter this:
heroku ps:scale worker=1
The worker runs listen.py to stream tweets into Cloudant.
To get TextBlob working on Heroku with Flask, the answer at the bottom of the page worked great!