- Review what a twitter bot is
- Create a low-tech bot
- Cover a basic bot script/system
- Break into groups/teams to work on bots
#What is a twitter bot?
- Automated posts on the Twitter microblogging service.
- Yes - some are spam to entice clicks. Others post @replies or automatically retweet in response to tweets that include a certain word or phrase.
- 24% of tweets that are on Twitter? source: Mashable
- new art form
- internet as poetry
- experimental, weird, community
Chatbot, datamining, markov chains, visual generation, text generation, mashup/text remixing, scheduled tweets, response bots...
#Some Twitter bots
- All bots by Darius Kazemi
- Big Ben by Jonathan Marchant
- Alicia Winderland by Lee Tusman
- story of glitch by thricedotted
- Pentametron by Rhanjit Bhatnagar
- Deleuze and Guattari
- GreatArtBot by Anthony Prestia
- Babelling Borges
- Two Headlines by Darius Kazemi
- Everyword by Allison Parrish
- Stealth Mountain by Jason Eppink
- Your Title Sucks/The Answer Is No by Jason Eppink
- Start With a Concept
- Find/write/develop your text
- You type out your tweets in advance.
- You use a scheduler like Hootsuite, Buffer or Botize. Or a simple script/program like IFTTT.
- Using cronjobs
- cron is a daemon, meaning it starts once and stays dormant until it is needed (a web server is also a daemon. it waits for a user to type in the url to load.)
- Note: You can make many accounts under same email address if you use YourEmail+NewTwitterHandle@gmail.com for example (you can do this while using private browse so you can have mulitple accounts open at once)
- Verify via email after making new account
- Go to https://apps.twitter.com/
- You need to register a phone number (arrrgh) if not already done. Must be unique!
- Create new app
- Go to Keys and Access Tokens tab
- Access Level should be: Read and write
- At bottom of page click the button to generate access tokens
- We'll be installing tweepy to access twitter in Python
- Open the command line/terminal shell and run this in Bash
Linux
sudo apt-get install python-pip
OR
Mac
sudo easy_install pip #if not already installed
pip install virtualenv
pip install tweepy
- Example script such as scriptname.py
- Add your access tokens and keys
- Test it in your terminal with
python scriptname.py
- DigitalOcean is a virtual private server
- You create droplets aka virtual (cloud) servers
- Sign up for an Ubuntu server
- You will be emailed an ip address, etc, prompted to change emails
- Log in
Steps are here
Steps are here
- You can upload to your server with
scp
scp <path/to/file/on/your/computer> <username>@<hostname>:<destination path>
for example
scp /Users/2sman/Documents/code/github\ projects/Gamelan_Ebooks/gamelan* admin@45.55.87.237:~
- We'll be installing tweepy to access twitter in Python
- Install pip on digitalocean server to root
apt-get update
sudo apt-get install python-pip
pip install tweepy
- first you need to add cron
sudo apt-get install cron
- Run
crontab -e
and you may have to select nano (2) as your editor - Add to bottom
0 * * * * python script.py
to have it run once an hour
- Corpora available to use