Tweets a random question using Node.js and twit library.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


This simple script tweets a random question using Node.js and the twit Twitter API library for Node module.

##To Use

This is based on Christian Paulsen's instructions to build a Twitter bot.

  1. Install Node.js and create a Twitter account for the bot.
  2. Register your bot as an application with Twitter.
  3. Install the twit module. Follow the instructions at the link to connect your Twitter account to twit.
  4. Create a text file called questions.txt, using one line per question. I've included a samplequestions.txt file with a few seed questions.

##What It Does

The script randomquestion.js will select a random line from questions.txt and post it to the Twitter account you created. It also logs the line selected in log.txt.

##Features I'd like to add

  • Add attempt to retry posting lines that are too line.
  • Search log to prevent re-posting lines that have already been posted.
  • Function to clear log file at regular intervals.