


If you’re still stuck, come visit the Twitter Community forums and we’ll be more than happy to help you out! If you bump into an error, most likely your credentials are not set correctly check your. Autohook’s got your back – you can find a sample implementation on the project’s page. Remember, users need to authorize your app before it can access their activity if you’re trying to authenticate a test user (or even better, if you’re asking a friend to help you test your app), make sure they’re authenticating using Sign In With Twitter and the 3-legged OAuth flow. What can go wrong at this point? The most common pitfall is that the authenticating user won’t authenticate. And because we provided your access token/secret, it also subscribed your app to listen to your user’s activity (it did come in handy)! It also ran a development server with logic to create a webhook and to validate the CRC signature. Chances are you’ve already done this: if so, you should see something like this in your dev environments page:īehind the scenes, Autohook handled OAuth for us. You also need to have a valid development environment assigned to this app. We’ll send back a sample autoresponder messageįirst things first: in order to use Twitter’s Account Activity API, you will need to create an app on Twitter, and give it the Read, write, and Direct Messages permission.We’ll show a typing indicator before sending the message.We’ll add a way to show messages as read.We’ll build the logic to only respond to incoming Direct Messages.We’ll set up Autohook, so it will do all the hard work for us.We’ll set up a project, including a Twitter app enabled with an Account Activity environment.We’ll build a simple autoresponder that’ll greet whoever Direct Messages your user. This way, you can spend zero time figuring out how a webhook works and instead focus on building awesome things on Twitter.Īutohook makes things very easy - so easy that you can automate a DM conversation on Twitter in less than 100 lines of code. Thankfully, Autohook is here to make things extremely easy for you.Īutohook is a Node.js module and a command line tool that sets up webhooks for you. This would sound like quite the task, if you didn’t have the right tools.
#Shrook control notifications twitter how to
This usually involves using the Account Activity API, configuring a webhook, figuring out OAuth, and understanding how to send back a message using additional Twitter APIs. A popular use case is with customer service, where your favorite brands can reply to your Direct Messages in real time, and determine the best next action. For example, companies can use this API to get a sense of how the global conversation is unfolding around their products and services. What’s best, it uses webhooks to deliver real time updates.ĭevelopers can achieve a lot with the Account Activity API. With this API, people can allow your app to get notifications about their activity on Twitter. The Account Activity API is one of the most versatile APIs in the Twitter Developer Platform.
