Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/justadudewhohacks/twitter-greet-followers-bot
A simple twitter bot to send your new followers a nice greeting message.
https://github.com/justadudewhohacks/twitter-greet-followers-bot
followers javascript twitter twitter-api twitter-bot twitter-streaming-api
Last synced: 4 months ago
JSON representation
A simple twitter bot to send your new followers a nice greeting message.
- Host: GitHub
- URL: https://github.com/justadudewhohacks/twitter-greet-followers-bot
- Owner: justadudewhohacks
- Created: 2018-02-04T15:25:55.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2018-02-05T14:29:29.000Z (about 7 years ago)
- Last Synced: 2024-01-30T03:40:22.514Z (about 1 year ago)
- Topics: followers, javascript, twitter, twitter-api, twitter-bot, twitter-streaming-api
- Language: JavaScript
- Size: 8.79 KB
- Stars: 26
- Watchers: 3
- Forks: 12
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
*A simple twitter bot to send your new followers a nice greeting message.*

## Requirements
### Credentials for the twitter api
Create a twitter app for your twitter account and switch to the tab *Keys and Access Tokens*. If you do not have an access token yet click *Create my access token*. Now you should have all your credentials:

### Heroku account
If you do not have a heroku account, set one up and install the heroku cli .## Set up your bot
1. Clone the repository:
``` bash
git clone https://github.com/justadudewhohacks/twitter-greet-followers-bot
cd twitter-greet-followers-bot
```2. Create a heroku app:
``` bash
heroku app:create mytwitterbot1234
```3. Set your twitter-api credentials as environment variables:
``` bash
heroku config:set consumer_key=xxx
heroku config:set consumer_secret=xxx
heroku config:set access_token=xxx
heroku config:set access_token_secret=xxx
```4. Edit greeting.js and insert your greeting message

5. Commit the changes and push to heroku
``` bash
git add .
git commit -m "changed the greeting message"
git push heroku master
```6. Stop the web dyno (default) and start your app in a worker dyno:
``` bash
heroku ps:scale web=0 worker=1
```7. Testing your bot:
If everything worked your bot should be running. You can test your bot by following: justapoliteguy, who will follow you back. Check if your greeting message was sent. You can retry as many times as you wish by unfollowing and following again.
## Trouble Shooting
In case your bot does not seem to work, you can open the heroku dashboard of your app and navigate to *View logs* by clicking the *More* button in the upper right corner:

If you see the output *credentials ok — running bot*, the bot should be up watching for new followers. As the log only displays a few lines, you can also dump the log to a text file:
``` bash
heroku logs -a mytwitterbot1234 >> logs.txt
```Another thing you might want to check is, whether your credentials are set up correctly. Navigate to the *Settings* tab and click *Reveal Config Vars*. Check and edit your credentials here.