Twitter Bots

Yesterday some of my Facebook and Twitter friends thought that I had gone mad or, at the very least, that my account had been hacked: there were strange postings appearing about random numbers and coding rainbow. What actually happened was that while I was away to Amsterdam, back at our Antwerp home Simon was working on creating Twitter bots, following a set of tutorials by Daniel Shiffman. Yesterday Simon covered  such topics as how to make a twitter image bot using node.js and Processing (node.js basics, unix commands in terminal, node package manager, OAuth, Twitter API basics, setInterval(), and triggering Processing from the command line). He also created a bot that replies to tweets.

What Simon didn’t show in the above video was how he actually controlled the tweets yesterday – via the command line where he typed in BASH:

cd node
node bot.js
cd ..

In the actual code that Simon wrote in Sublime Text in JavaScript he programmed the bot to tweet every 20 seconds:

Screen Shot Twitter Bot 26 Mar 2017

Today Simon went on with the next step of the challenge: learning how to deploy his bot to a server to “run forever and ever!” He created an account at Amazon Web Services and successfully used it, he also managed to use his CyberDuck app for sftp file upload. In the end, however< something didn’t go right wile running the new Processing sketch via the command line and nothing got published on Twitter. Simon gave up at that point. It must be mentioned that he came down with a bad cold the same evening.

In the video below, Simon explains all the steps he was taking during this second phase of the project, jiggling with a formidable number of apps and languages:

 

IMG_4217

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s