https://github.com/rishabkumar7/twitterbanner
https://github.com/rishabkumar7/twitterbanner
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/rishabkumar7/twitterbanner
- Owner: rishabkumar7
- Created: 2021-07-02T19:42:37.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2021-07-02T20:50:18.000Z (over 4 years ago)
- Last Synced: 2025-01-11T18:47:37.143Z (about 1 year ago)
- Language: JavaScript
- Size: 79.1 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Real time Twitter Banner
Inspired by - [Devesh](https://github.com/Deveshb15/real-twitter-banner)
## How to setup for your Twitter
Just fill in your API keys which you'll need to apply for a [Twitter developer account](https://developer.twitter.com/en/apply-for-access). It usually get's approved within 5 minutes.
```
const TWITTER_HANDLE = 'Deveshb15'
const twitterClient = new client.TwitterClient({
apiKey: "YOUR CONSUMER API KEY"
apiSecret: "YOUR CONSUMER API SECRET"
accessToken: "YOUR ACCESS TOKEN"
accessTokenSecret: "YOUR ACCESS TOKEN SECRET"
});
```
Lastly, change the default banner `1500x500.png`. Make sure it's a `png` (as in the mimetype, not just the file extension).

## Run the script
Install dependencies:
```
npm install
```
Start the app:
```
node index.js
```
or
```
npm start
```
## How the script works
Summary:
1. Fetch your recent 3 followers using Twitter API. (Rate limit: 180 requests per 15 mins)
2. Download the profile image of the recent 3 followers.
3. Use Jimp to add it on banner
4. Update your profile banner using Twitter API. (Rate limit: 30 requests per 15 mins)
The delay between follow and banner update is between 6s to 15s.
**Feel free to contribute to this project, would love to have you as a contributor. Just fork the project, create an issue, and then create a pull request!**