Skip to content

Tracks changes to the twitter username or bio of twitter users who you follow. Not sure if this is an app or a bot?

Notifications You must be signed in to change notification settings

cori/twitter-bio-tracker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A template for a Twitter bot that responds to @ mentions and DMs

(work in progress...)

Note: You can see the bot on Twitter.

Apps hosted on Glitch are automatically put to sleep after 5 minutes of inactivity (that is, if nobody opens your app in a browser window or it doesn't receive any data).

Twitter's API doesn't send requests to your app, instead your app has to poll Twitter for data, which means, the bot will simply doze off after the first five minutes and will sleep through all the DMs and tweets it receives.

If you want your bot to respond to @ mentions and DMs, you can wake it up every 25+ minutes using a web service like Uptime Robot, cron-job.org, or others, have the bot search for tweets mentioning it, and respond to those tweets and any DMs it received.

Tweetin'

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) and your bot's username.
  3. Update server.js with some cool Twitter bot code.
  4. Set up a free service (Uptime Robot, cron-job.org, or others) to wake up your bot every 25+ minutes and tweet. Use https://YOURPROJECTNAME.glitch.me/tweet as a URL to which to send the HTTP request.

Check out the Twit module documentation for examples of what your bot can do, for example retweet a specific tweet by its ID:

T.post('statuses/retweet/:id', { id: '799687419259797504' }, function (err, data, response) {
  console.log(data)
});

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 :-)

Support Botwiki/Botmakers

🙇

Powered by Glitch

\ ゜o゜)ノ

About

Tracks changes to the twitter username or bio of twitter users who you follow. Not sure if this is an app or a bot?

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published