Author: Christopher Peri, Bess Ho, Jon Wu & Chia Hwu
Publisher: Sams, 2011
Aimed at: Mostly PHP programmers
Pros: Lots of introductory material plus examples
Cons: Lacks explanation and depth
Reviewed by: Lucy Black
The Twitter API seems to be complicated when you first meet it but it is basically just a fairly standard Rest based API. The reason it seems complicated is that there is quite a lot of it and it can be difficult to know where to start or what facilities there are. This book offers you a chance to master the API in 24 one hour lessons - of course no one is checking that you actually do take an hour over each one.
The book starts off with an easy hour - the history of Twitter and basically what Twitter is all about. Most programmers probably know all of this already. Chapter 2 is on getting signed up and registering your applications. It is at this point you are most likely to notice the authors' two failings. The first is a tendency to launch straight into something without an explanation on the assumption the reader know more than is reasonable. For example on page 11 there is a heading Whitelisting with an opening sentence:
Here is the current policy for Twitter.com on whitelisting:
Only if you already know something about Twitter development do you stand a chance of knowing what whitelisting is about. The second failing is the tendency to simply quote an internet source such as the aforementioned Twitter policy on whitelisting. You will find exact quotes from Twitter and Wikipedia used to define and explain.
Chapter 3 considers the types of Twitter user you can cater for with your app and types of app you could build - its a bit pointless. Chapter 4 is all about setting up a LAMP stack because the rest of the book uses PHP to demonstrate the use of the API. If you are already a PHP programmer and have a development environment already setup you can skip this chapter. Of course if you want to work with another language you can skip the chapter and perhaps even the entire book.
From here we start an exploration of the API in detail - your first API call, a simple reader, building a framework, using OAuth, a client, direct messages, lists, favorites, search, trends, GEO, notification, the streaming API and finally in this section of the book the future of the API. This is all reasonably well presented but for me there are too many places where the book says "this is too advanced for this book". The topics that are left out not those directly about the Twitter API but are on other aspects of the code such as libraries in use or the XML parsing facilities in PHP. None are that difficult and the book fails to give any overview of what is going on. If you just want lots of examples then you might find it more acceptable than I did.
The final part of the book deals with working with Twitter using Android and iOS. In each case we have a getting started and then some examples.
If you want an account of the Twitter API using mostly PHP and processing the results in XML and you want lots of examples then this might be a good place to start. For me the book had too many "introductions" and failed to make the technology clear and simple.