Information Technology Reference
In-Depth Information
3
Chapter
Twitter Applications:
I Love Ham
Now that we have one mobile web application under our belt, I want us to explore using
the Twitter API to do something a little different from the same old classic “displaying
Twitter messages applications” that are cropping up left and right. As we discussed in
Chapter 2, using the Twitter API gives you access to the alwaysplentiful “fire hose” of
data that can be used for all types of applications and games—basically anything you
can imagine.
One idea for which I have always loved using Twitter came from a series of old web
shows that were around a few years ago. While the name of this game changed from
show to show, the main principle behind the game was always the same. A user is
presented with two different search terms that rhyme and would have to guess which
term results in a higher number of tweets. While the rules are simple, this little game,
which we will build and call “I Love Ham,” can yield hours of fun. So without further ado,
let's fire up our local development environments and start writing some code!
The HTML
The following, Listing 3-1, sets up the basic HTML document that will become the basis
for our application.
Listing 3-1. HTML for I Love Ham
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<title>I Love Ham</title>
<linkhref=' http://fonts.googleapis.com/css?family=Droid+Sans&v1' rel='stylesheet'
type='text/css'>
<linkrel="stylesheet" type="text/css" href="css/style.css">
<script type="text/javascript" src="js/jquery-1.6.1.min.js"></script>
<script type="text/javascript" src="js/main.js"></script>
39
 
Search WWH ::




Custom Search