This tutorial uses Python and the package tweepy in order to create a bot which tweets random bits of laughter.
You can print out the handout, wugbot_twitter.pdf, and follow along with the video on YouTube. By the end of the YouTube video, you'll have created a file similar to laughbot.py.
You can also find a similar tutorial, which uses twython instead of tweepy, on the wugbot blog.