🤖
Twitter Bot Header
How to setup for your Twitter
Add a '.env' file and insert these lines:
API_KEY='' # API key
API_SECRET='' # API key secret
ACCESS_TOKEN='' # Access token
ACCESS_SECRET='' # Access token secret
SCREEN_NAME='' # Twitter handle (without the @ character)
To get the API keys, you need to apply for a Twitter Developer account.
It's free and take ~5 minutes.
Lastly, add a banner template file with this specific name : twitter-banner.png. (make sure your file is a png image and have a size of 1500x500px)
Run the script
Install dependencies:
yarn
or
npm install
Start the app:
node index.js
Keep it running with a process manager like pm2 and have fun!
How the script works
The script fetches new replies every 60 seconds (to avoid rate limit).
Development guidelines
Eslint & Prettier have been configured on this repository. Don't forget to run them before each commit (or after a pull-request is rebased onto the latest commit of the main branch).
How to reformat with both eslint and prettier?
npm run lint:fix
How to run eslint?
npm run lint
Most importantly
Follow me on Twitter! @guillaume_rygn
Thanks!