Developer’s Guide to Social Programming

Building social context using Facebook, google friend connect, and the Twitter API
A bit of rest, a bit of CodeIgniter and a lot of JSON and APIs

As the book’s title indicates, it covers using the APIs provided by Twitter, Facebook and Google to connect your site to them and share data between them. The book is organized into four sections, each looking at one platform and ending with a “putting it all together” chapter. It’s aimed at intermediate programmers familiar with PHP and web technologies including REST and JSON.

Each chapter starts with an overview of the platform, then provides an introduction to the API(s) and examples of how to use them. There are plenty of example code and some break-out boxes with either tips or explanations of terminology.

The first section is on Twitter and, also, the API, this chapter covers the expected topics like the OAuth protocol Twitter uses for authenticating third-party sites. Still, it also includes newer features, like location awareness. The sections on Google’s OpenSocial and the Facebook platform are more involved as they offer more ways to connect with other sites. Having reviewed books on both OpenSocial and Facebook development in the past, the material here is more up to date. For instance, Facebook has removed some ways developers used to be able to post to users profiles, and OpenSocial has continued to evolve and along the way gained some tools that make writing against it more straightforward than previously. I wouldn’t say this book is a replacement to a dedicated book on either OpenSocial or the Facebook platform, but it does cover how to do some everyday tasks.

See also  HTML5 Guidelines for Web Developers

Chapter 12 introduces the reader to the CodeIgniter, a bare-bones PHP framework, and builds a micro-blogging site (Sprog: Social PROGamming) with it. Chapter 13 then takes this and integrates Twitter, Facebook and Google. It shows how to log-in with Google Friend Connect. In short, this is a practical example of plenty of developers who might want to add their projects.

Overall, this 300-odd page book teaches what you’d expect it to, and touches on a bunch of related topics. There is plenty of example code written for PHP 5; which fortunately means there’s proper error handling (try/catch) used. The example application at the end will probably satisfy most readers looking to integrate these social sites into their projects. It’s a readable book.