The Facebook Platform Architecture

When you visit any application on Facebook, it looks just as though it were being hosted right on the Facebook servers. In reality, Facebook is simply a proxy, reading the browser requests, passing them onto your servers, reading your servers’ responses, and then parsing that information back to the user in HTML format (see Figure 2-1).

When you access a Facebook app, you are actually talking to Facebook’s servers, which in turn communicate back to your servers

Figure 2-1. When you access a Facebook app, you are actually talking to Facebook’s servers, which in turn communicate back to your servers

The one exception to this process is when data is rendered within an iframe. iframes on Facebook are not parsed by Facebook, so they allow you to do almost anything you want without worrying whether Facebook is able to parse the data you are providing. iframes have their limitations, however, because FBML is not possible in an iframe! I’ll explain more of those limitations in the <fb:iframe/> section in Chapter 3.

Chapter 3 is intended to be a reference to FBML. In it, I will include examples of the code you’ll be writing and show you what these examples render. I hope you’ll be able to refer back frequently to the next chapter as you continue your development on Facebook.

Get FBML Essentials 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.