- Notifications
You must be signed in to change notification settings - Fork3
MSFTserver/twitter-retweet
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
This is a simple twitter bot, designed to retweet and like the contents of a twitter list based on keywords to reject and accept certain tweets.
- Install node.js & npm (if you haven't already).
- Download this repo with
git clone git@github.com:MSFTserver/twitter-retweet.git
. - in Terminal or Command Prompt, Navigate into the folder and run
npm install
to download dependencies. - Rename
.env.example
to.env
, or you can actually just set them in your systems Environmental Variables and skip step 5. - Open
.env
enter the Account Name, enter the Lists ID number (can be found in the URL), enter Reject keywords you want to EXCLUDE, also theAccept keywords on what you want the bot to INCLUDE. lastly enter the keys for your bot. If you have don't have keysCreate a twitter application HERE, grant it the necessary access, and generate your tokens/keys. - run the bot
npm run start
.
The test script will see if the bot can grab the member IDs from a twitter list.It will also pipe in tweets from the statuses/sample API for 30 seconds running the filter checks on the tweets and retweeting/liking.
NOTE: It is recommended to use a alternative account for testing with as it will make a lot of retweets and likes on the profile.
- Create a new twitter application HERE and keys to run the test as it will attempt to like and retweet from the piped in tweets.
- Open
.env
and edit the values prefixed with TEST eg.TESTLISTID=
- Run script with
npm run test
Twitter Retweet is written innode.js
This project was originally forked fromtwitter-listbot changing the API client totwit for more error handling and other small changes.