Book Image

Flash Facebook Cookbook

By : James Ford
Book Image

Flash Facebook Cookbook

By: James Ford

Overview of this book

Flash applications are popular and becoming increasingly social. With flash applications for facebook you can tap into a potential audience of half a billion existing users, their connections and affiliations, their uploaded images, posts, comments and more.The Flash Facebook Cookbook is packed with recipes for the Graph API and FQL, used for reading and writing data as well as interacting with Facebook anonymously or on behalf of an authorised Facebook User.The topics covered by the recipes in this Cookbook include working with News feeds, uploading Photos, searching for and plotting Places on a map and much more. The cookbook has recipes ranging from those that work without any authentication with Facebook to those that do, and act on behalf of a user. Packed with recipes that yield practical demonstrations of the Graph API functionality, the Flash Facebook Cookbook is an essential tool for Flash Platform developers.
Table of Contents (18 chapters)
Flash Facebook Cookbook
Credits
About the Author
Acknowledgement
About the Reviewers
www.PacktPub.com
Preface
10
Checkins and Facebook Places

Using subqueries in FQL


Almost anything you would want to do through the Facebook Graph API is possible with FQL and the Facebook ActionScript 3 SDK. But wrapping your head around the structure of a query, and how you can actually use one to retrieve the data you want, requires a bit of effort and a shift in mindset—particularly if you've not done any SQL before!

Subqueries are an integral part of FQL; they allow us to perform multiple queries within an overall query, and the results of those nested queries feed in to the larger overall query, affecting its results. The big bonus to using subqueries is that everything is done on the server side, which speeds things up tremendously compared to the alternative of not using subqueries, having to go back-and-forth between the client and server to generate the final query.

One of the most common types of subquery would be that which returns a list of the user's friends. In this recipe, we're going to use a subquery to return user details of the...