A Twitter bot to know the query's rating at a glance on Twitter visualizely.
Usage: Tweet a search query to @twiwordcloudbot. Then the bot will search tweets and reply with a wordcloud image.
- MeCab
- tweepy
- word_cloud
- A free Heroku account (No credit card required)
- A Twitter account
You can get Twitter API keys and tokens from https://apps.twitter.com/app/new.
-
Clone this repository
git clone https://github.com/cygnan/twitter-wordcloud-bot cd twitter-wordcloud-bot
-
Create a Heroku app and add some configs
heroku create {APP_NAME} heroku config:set LD_LIBRARY_PATH=/app/.linuxbrew/lib heroku config:set MECAB_PATH=/app/.linuxbrew/lib/libmecab.so heroku buildpacks:set https://github.com/heroku/heroku-buildpack-multi
Note: Heroku CLI needed. Choose an unique app name for
{APP_NAME}
. -
Get your Twitter API keys and tokens, and set them.
heroku config:set CONSUMER_KEY={YOUR_CONSUMER_KEY} heroku config:set CONSUMER_SECRET={YOUR_CONSUMER_SECRET} heroku config:set ACCESS_TOKEN={YOUR_ACCESS_TOKEN} heroku config:set ACCESS_TOKEN_SECRET={YOUR_ACCESS_TOKEN_SECRET}
You can get these keys and tokens from https://apps.twitter.com/app/new.
-
Deploy your app
git push heroku master heroku ps:scale worker=1
Copyright © 2017-2018 Cygnan
Licensed under the MIT License with the exception of a font, see LICENSE.md.