Twitter Bots

Document Sample
Twitter Bots Powered By Docstoc
					Twitter Bots
what they are and how to make them

Neil Crosby -

What’s Twitter?
• You all know already. • But if you don’t… • SMS length mini updates of your life.

What’s a Bot?
• Automated process that responds to user input.

Twitter API
• I’ve created an encapsulation in PHP. • This makes things easy.
$api = new Twitter($uname, $pword); $messages = $api->directMessages->direct_messages(); $api->status->update( ”tweet tweet" ); $followers = $api->user->followers();

Examples of Twitter Bots




Web Service “Friendly”

RSS Bot
• Tell it to watch an RSS feed. • Whenever the feed is updated, it tweets.

E.g. TenWordReview, ttwr

Channel Bot
• Bot echos any direct messages out to the public timeline. • Only people following the bot see these messages. • Thus, we achieve channels in Twitter. • E.g. yahoofood

Werewolf Bot
• Written for yesterday
• “d werebot wwwhs cbetta fatbusinessman mseckington cazm cubicgarden ginader niqui phae aral SteveMarshall cackhanded”

• werewolf, healer, seer • Direct messages each player to tell them what they are. No cards required.

• E.g. werebot

Web Service Bot
• More complicated (but still not very).
– Takes input from user. – Passes input to web service. – Direct messages user with result of web service call.

• No working example yet (ttwr soon).

“Friendly” Bot

• Keeps track of who’s following him and then friends them. • Vital for easy management of channel, werewolf and web service bots. • Currently unimplemented (oh noes).

Where’s the Automated?

Cron job!

Here’s the Code!

• • • • • • • • • • •

Description: Twitter Bots