Skip to content

bot who update banner and location every 60 sec depending on the number of followers 🤖

License

Notifications You must be signed in to change notification settings

guillaume-rygn/Twitter-header-bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🤖 Twitter Bot Header

banner

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.

You'll have to make sure the banner template file is an image in PNG format.

Besides, you'll have to resize it by following the official sizing recommendations:

  • width: 1500px,
  • height: 500px

i.e. 1500x500 in px

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

French Tutorial here.

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!

About

bot who update banner and location every 60 sec depending on the number of followers 🤖

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published