The github repository with examples of twitter bots:
The link to download the zip of this is here.
1) Read through the explanation and experiment with running the code from retweet.bot Get it to retweet different hash tags.
2) Then try file bot – explanation here. This bot will tweet random lines from a an external file you pass to it.
3) The other example in this folder is one of the node.js library examples. It is a more complex bot that randomly follows and unfollows people and tweets the most popular github tweet. Run it if you are game.
Remember to run these bots. Unzip the files. Open your terminal and navigate to the folder with the filename.js file you wish to run (use the command cd and then drag the folder from the finder to the terminal to change folders). Then start it by typing
For the file bot type
node filename.js mytext.txt
This is explained in the description text (readme.md files). To exit, remember you hit CTRL C.
Some notes and resources for making bots:
First of all, working in public comes with responsibility. Don’t offend, make things that make the internet a better place than it was when you found it. For basic Twitter bot ethics – please read Darius Kazemi’s guide.
See examples of twitter bots written using node here: https://github.com/tegacodes/botTutorials
Python twitter bots:
- Basic code repository for a simple twitter bot in Python.
- Allison Parish code repository for dealing with language in Python.
Guide to making Twitterbots without code
Processing twitter library (see tutorials on this site for code examples):
More bot readings and resources
- Bot Summit, 2013 – http://tinysubversions.com/2013/11/bot-summit/
- Bot Summit, 2014 – http://tinysubversions.com/botsummit/2014/
- Bots should punch up – http://www.crummy.com/2013/11/27/0
- Bots for Protest – https://medium.com/@samplereality/a-protest-bot-is-a-bot-so-specific-you-cant-mistake-it-for-bullshit-90fe10b7fbaa