Product Details
Learning Facebook Application Development: A step-by-step tutorial for creating custom Facebook applications using the Facebook platform and PHP

Learning Facebook Application Development: A step-by-step tutorial for creating custom Facebook applications using the Facebook platform and PHP
By Mark Alexander Bain, Hasin Hayder

List Price: $39.99
Price: $35.99 & eligible for FREE Super Saver Shipping on orders over $25. Details

Availability: Usually ships in 24 hours
Ships from and sold by Amazon.com

22 new or used available from $32.99

Average customer review:

Product Description

A complete guide to creating Facebook applications using PHP, this book focuses on realistic, complete examples-building common features step-by-step, with plenty of practical advice. This book is for PHP5 developers who want to create custom Facebook applications. It assumes no knowledge of the Facebook API or Platform, but does assume that you are a Facebook user.


Product Details

  • Amazon Sales Rank: #1268784 in Books
  • Published on: 2008-05-30
  • Released on: 2008-05-30
  • Original language: English
  • Number of items: 1
  • Binding: Paperback
  • 240 pages

Editorial Reviews

About the Author
Hasin Hayder graduated in Civil Engineering from the Rajshahi University of Engineering and Technology (RUET) in Bangladesh. He is a Zend-certified Engineer and expert in developing localized applications. He is currently working as a Technical Director in Trippert Labs and managing the local branch in Bangladesh. Beside his full time job, Hasin writes his blog at http://hasin.wordpress.com, writes article in different websites and maintains his open source framework Orchid at http://orchid.phpxperts.net. Hasin lives in Bangladesh with his wife Ayesha and his son, Afif.


Customer Reviews

Mistakes abound2
I don't think the other reviewer here even worked through the book--if 'W' even read it--but as one who has, I have to unfortunately give the book low marks.(actually 2.5 stars)

First, I'll start with the good:

The authors introduce a lot of tools that help development very early on, and I appreciate their teaching style. I think they had the ability to produce something wonderful.

Now the bad:

Typos in Math and Programming books range from easily corrected to inexcusable. This book includes the gamut. (The publisher's site has no errata listed; I contacted one of the authors but never heard back) The first place I noticed errors that brought hours of frustration is on page 48. The authors incorrectly identify a few of Facebook's Mock AJAX functions as:

clickwriteform
clickwriteid
clickwriteurl

Then they proceed to use those incorrect functions in their code. I found their error by consulting Facebook's API and seeing that the correct functions are clickrewriteform, etc. (notice the 're' in the middle--it's easy to miss. And apparently they missed it a lot in the book.).

The next place that shows extremely poor editing (do these publisher's editors get paid for this work?) is on page 79:

"Our file (let's call it auto_update.php) starts off the same as appinitiate.php"

There is no 'appinitiate.php' ever mentioned in the book to that point. The authors meant 'appinclude.php'. But this mistake is forgivable except for the fact that the reader is given code to update user profiles, but never told just how this 'auto_update.php' file is ever called. And the code that accompanies the book (via a download from the publisher's site) doesn't include any of these lines anywhere. So, One has no idea just how this php code will ever get called. Instead, after presenting the different lines of code:

"...
Now, we need to set the Facebook user manually:

$user = '614902533';
$facebook->set_user($user, $appsession);

Finally, we can send some text to the profile:

$fbml_text .= "

You've been tagged!

";
$facebook->api_client->profile_setFBML($fbml_text,$user);

Then, it's just a matter of logging back onto Facebook and seeing what affect we've had:"

As I mentioned: just how is this code ever having any effect on a Facebook profile? (It doesn't, btw. Here's why: the session *is* tied to the person logged in--and it changes when someone logs out. The authors incorrectly state that the session isn't based on logins, but rather on the install of the app. So, if one logs out as the authors instruct, the session ID you use to alter your profile will no longer be valid. The only way it works is if you're logged in and if you visit the php file on your server directly. This means this entire section of the book is invalid and sets readers up for failure.)

I have the impression that the authors rushed it out and the editors didn't care enough to have anyone test the quality or accuracy of the book. Frankly, I think it's generous to give this book 2.5 stars.

One can blame the publisher for poor editing, but one can also blame the authors for not supporting their work (by at least setting up a forum to let readers help each other, or to have the publisher do this).

p.s. I'll update this review if I finish the book so I can reinforce it's strengths or weaknesses. I might just drop it and use the online API docs.

easy to learn4
For developers wanting to latch onto Web 2.0 in its Facebook incarnation, the authors explain what is involved. Facebook has published its own markup language, the eponymous FBML, along with an associated query system, FQL and an API. You need to be versed in PHP, because, for now at least, Facebook made the simplifying assumption (for them, not you) that PHP will be the underlying language for your apps.

FBML is shown as easy to pick up. You certainly should be already familiar with HTML. While this is not strictly necessary, according to the authors, I just can't imagine a potential Facebook developer not already proficient in HTML.

The text has extensive sample code that should be straightforward to understand. Possibly portions of it can be reused in your context, depending on the originality of your application's needs. The code includes all the expected features of a typical application, like including URLs, images and text. The FBML gives a lot of leeway in arranging the visual presentation of the app.

Also important is how the text describes the necessity for your own database, and the hooking up of this to the Facebook environment of your app. For most realistic apps, you will need this database.

FBML does have limitations, though you have to parse the book a little to see this. For practical reasons, probably related to the need for quick deployment, it assumes English as the natural language of the app. There appears to be no internationalisation in this version of FBML, insofar as the book's discussion goes. So for things like showing the correct pronoun of a user, the result returned is the English "he", "she" or "they". Quite apart from the specific English nature of these tokens for the third person, note also the assumption of only one form for the third person plural. Other languages, like French, have 2.

I offer a suggestion that a future version of this book will document far more extensive i18n. Facebook needs to maintain its growth rate, and its American audience is surely saturating, so the overseas market will need to be catered to.