Understanding How Your Application Will Access Facebook

Now that you understand the general philosophies and paradigms of Facebook development and hopefully have a good idea of where you want to start and what your strategy is, it's time to start understanding the depths of the Facebook application environment. Depending on whether you're fishing or farming, your application will access Facebook's APIs entirely differently, and your users will interact with your application in a different way. I start with how an application on the Facebook.com environment is set up.

The Facebook.com environment

You certainly want to read Chapters 2 and 3 to get more details on this, but I give you a summary here. When you host an application on Facebook, you are not really “hosting” it, per se, but instead you are using Facebook as a proxy between you and Facebook users.

A typical Facebook application works like this:

  1. Users go to http://apps.facebook.com/yourapplicationname.
  2. Facebook makes a call to your servers (through an iFrame HTML tag).
  3. Your servers look at what was called and format data accordingly. During this time, your servers may also make calls back to Facebook's API to retrieve additional information (such as friends, profile information, and so on) before returning that data to the user.
  4. Your server then returns the formatted data to Facebook.com in an iFrame (note that sometimes this can just be a redirect message sending the user to authenticate or authorize your application). ...

Get Facebook® Application Development For Dummies® now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.