Skip to content

mhick/tweet-random-question

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

tweet-random-question

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.

About

Tweets a random question using Node.js and twit library.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published