- Create a .env file
- Add the following properties
TWITTER_CONSUMER_KEY=
TWITTER_CONSUMER_SECRET=
TWITTER_ACCESS_TOKEN=
TWITTER_ACCESS_TOKEN_SECRET=
TWITTER_WEBHOOK_ENV=
To generate these keys, you have to apply for Twitter Developers account and then create a new application in the Developer Portal Dashboard.
- Run
npm install
andnode index.js
- Yet to add media_id to the reply tweet
- Extract tweetId from the tweet sent by a user (Twitter automatically shortens the URL)
Inspired by this tweet by Apoorv Taneja