Skip to content
This repository has been archived by the owner on Aug 17, 2021. It is now read-only.
/ twit-webhook-bot Public archive

Glitch-hosted Twitter bot listening for webhook responses from Account Activity API

Notifications You must be signed in to change notification settings

andypiper/twit-webhook-bot

Repository files navigation

Glitch Twitter bot template with Twitter Webhooks API

Emoji wave hand

Remixed from https://glitch.com/edit/#!/twitterbot-webhooks

This is a template for making fun Twitter bots with Glitch and the Twit node.js library. It uses the new Twitter Webhooks API.

While this API is in beta, you need to get your Twitter application whitelisted and the API only supports delivery of Direct Messages.

A quick tutorial

  1. First, create a new Twitter account and a new Twitter app. (This tutorial shows how.)
  2. Update the .env file with your Twitter API key/secrets. (The tutorial above explains how to get these.) 2a. Update the URL to the running Glitch app at line 46/47 so that the Webhook can be registered successfully
  3. Update server.js with some cool Twitter bot code. (The included example simply responds to every DM with "Hello 👋".)
  4. Open your project's page (it looks like https://PROJECT-NAME.glitch.me) and click Register webhook.
  5. Your bot can now respond to DMs!

Also, for your convenience, your project's log will show your bot's activity.

Logging

Check out the Twit module documentation for more examples of what your bot can do.

You can find more tutorials and open source Twitter bots on Botwiki.

And be sure to join the Botmakers online hangout and submit your bot to Botwiki :-)

Powered by Glitch

\ ゜o゜)ノ

About

Glitch-hosted Twitter bot listening for webhook responses from Account Activity API

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published