Step 1: Get Developer account
https://developer.twitter.com/en/apply-for-access
Note: Review & approval usually takes 10–15 days.
Step 2: Create Twitter App & Dev Environment
https://developer.twitter.com/en/account/get-started
Step 3: Generate app access token for the direct message using twitter developer portal
Note: Change the app permissions to "Read, write, and direct messages" & generate the access token.
Step 4: Create the Node module & run it.
Run command: node app.js
Step 5: Tunnel to your localhost webhook using Ngrok
run the following command on the same directory using terminal/command prompt: ngrok http 1337
Copy the "https" url. (It will be something like https://XXXXXX.ngrok.io)
Step 6: Download account activity dashboard
Git clone https://github.com/twitterdev/account-activity-dashboard.git
run the module using "npm start" using the terminal/command prompt
Step 7: Attach Webhook
open "localhost:5000" on the browser.
Click on "Manage Webhook"
Paste the "ngrok url" into "Create or Update Webhook" field & click submit
Step 8: Add a user/page subscription
Open terminal/Command prompt
Goto "account activity dashboard" folder
execute "node example_scripts/subscription_management/add-subscription-app-owner.js -e "
note: Add user subscription for the user that owns the app.
Top comments (0)