This is a Next.js project bootstrapped with create-next-app
.
First, copy the .env.local.example
file to .env.local
and fill in the values.
The TWITTER_TOKEN
is a bearer token that you can get from Twitter's developer portal.
Then, install dependencies and run the development server:
npm install
npm run dev
# or
yarn
yarn dev
Open http://localhost:3000 with your browser to see the result.
The UI should be fairly straightforward, but here's a quick rundown:
- Paste in the ID of a tweet you want to get retweets for in the text box.
- Click the "Pick a Winner" button.
- The winner will be displayed in the "Winner" section.
- To reroll, click the "Reroll" button. This will pick another winner without calling the server to get new data.
- To get new data, click the "Update tweet data" button. This will call the server to get new data and then pick a winner from the new data pool.
This project is licensed under the MIT License - see the LICENSE file for details.