this is a bot that quickly detect the Favoritting of someone's Twitter account, and post it to a Slack and/or Lingr
- Get someone's twitter favoritting via Twitter REST API
- Take diff previous one
- Post new one to Slack or Lingr via bot API
- Your Twitter account (https://dev.twitter.com)
- Notitication destination:: Slack or Lingr
- Python 3
- venv
- peewee
- tweepy
- Make
-
clone this repo to some your directory
$ mkdir -p ~/workspace $ git clone https://github.com/tinbotu/favwatch.git ~/workspace/favwatch $ cd ~/workspace/favwatch
-
copy configration file from a skeleton file
$ cp settings.yml.skel settings.yml
-
CREATE YOUR TWITTER APP
- Go https://apps.twitter.com/
- Login or Join
- Click Create New App
- Fill in the form
- Go to Permissions tab
- Set access to read only
- Go to Keys and Access Tokens tab
- Copy these to settings.yml :: Consumer Key, Consumer Secret, Access Token, Acces Token Secret
-
setup your Webhook to your Slack (if necessary)
- Go https://YOUR_TEAM.slack.com/apps/A0F7XDUAZ-incoming-webhooks
- Click Add Configration
- Choose a channel or create, Click Add Incoming WebHooks integration
- Copy Webhook URL to settings.yml
-
setup your Lingr bot (if necessary)
- Go http://lingr.com/developer
- Click create a new bot
- Fill in the form and click Create
- You have to prepare dummy URL that could to accept POST method, Fill in the Callback URL
- Copy Secret to settings.yml
- Go http://lingr.com/room/YOUR_ROOM/manage_bots and click invite a new bot, invite bot created above
$ make setup
if it fails, make sure that Python3, Python3-venv, Make, compilier to build some modules are installed.
$ make run
at the first run, all recent favorites will post (such many). only difference will be posted from the next time.
- delete working directory that git clone
- revoke your Twitter APP, Slack WebHooks, etc (if necessary)
github: tinbotu
MIT