HACKER Q&A
📣 julia01

Whats the easiest way to build a Twitter bot nowadays?


I need to create a simple twitter bot that can take the tweets listed in say a CSV text file, and then tweet those tweets on a schedule.

Rather than build it myself, I expect that there has to be some sort of utility or a website or a template that I could use to get started?

This is for a personal itch I need to scratch so duct taping is totally ok


  👤 ColinWright Accepted Answer ✓
I do exactly this. I use oysttyer[0] to do the tweeting, and I wrote a bash script to:

  * read a line from a file;
  * tweet that line;
  * rotate the line to the bottom.
Then I run that script from a cron job.

The magic is in oysttyer. It is a little tricky getting it to run automatically because it requires the tweet text as a command line parameter, and can't read it from a file or stdin. Even so, all pretty trivial, really, depending on your existing skill set. You need skills to:

  * read the line and feed it to oysttyer;
  * rotate the top line to the bottom;
  * set up cron scheduling.
[0] https://github.com/oysttyer/oysttyer

👤 jjjbokma
Posting a tweet picked from a file at random: http://johnbokma.com/blog/2019/03/08/posting-a-tweet-picked-...