Closed iFlameing closed 5 years ago
@super-ienien I am getting the following error on heroku
UnhandledPromiseRejectionWarning: Error: Could not authenticate you.
2019-07-22T20:32:12.217155+00:00 app[web.1]: at Request.request [as _callback] (/app/node_modules/twitter-webhooks/lib/helpers.js:27:33)
2019-07-22T20:32:12.217157+00:00 app[web.1]: at Request.self.callback (/app/node_modules/request/request.js:185:22)
2019-07-22T20:32:12.217159+00:00 app[web.1]: at Request.emit (events.js:198:13)
2019-07-22T20:32:12.217161+00:00 app[web.1]: at Request.
@super-ienien what do you mean by the user access token and user access token secret I am confused regarding with app access token and app access token secret. what is the difference between user access token and app access token? I got one with twitter developer account but didn't get the second one. can you please tell me from where I can get user access token.
I also could not make this work, sadly... Any alternatives to this library are much appreciated..
@iFlameing If you wan't to make user subscription you have to provide a user access token that you get from oauth authentication process You cannot make subscriptions on behalf of an unauthenticated user.
@super-ienien I have consumer key consumer secret access token access token secret from Twitter app key and permission. If I need any thing more than this?
If you wan’t to subscribe to user activity events you need to do it on the behalf of a user. So you need his access token and access token secret. In order to get these tokens you need to implement the oauth process explained in the twitter’s doc
But when you are already using the bot/Dev account you already have all necessary tokens built through the app itself (for the owner account) -
This is how I use all Twitter api's
Read the doc to generate your tokens : https://developer.twitter.com/en/docs/accounts-and-users/subscribe-account-activity/guides/authenticating-users
Then use the generated tokens to create subscriptions
Hi, Just stuck at this point I am able to test the webhook by requesting with ?crc=12345 but I didn't getting any console.log when anyone follows me. can you tell me why. You can see the source code at https://github.com/iFlameing/my-twitter-bot and you can test the app at this Heroku url https://iflameingtwitter-bot.herokuapp.com/?crc_token=123456788. Please tell me what should I do now to see the response.