Getting information

We know how to get information out of the database by means of the Graph model: we request an object (or list of objects), subject to certain criteria, and we retrieve a JSON representation of that object (those objects). The obvious next question is: how do we get this data if we're thinking in terms of a relational database model?

For this we use Facebook Query Language (FQL for short). It's a language quite different to object-oriented languages; it's designed specifically for getting information out of a relational database, unlike AS3 which is not designed to solve any specific problem. It differs heavily in syntax, too, as we'll see.

Let's take a look at an example, getting some information out of the page table:

page

Get Facebook Graph API Development with Flash 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.