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
About the Author
About the Reviewers
Checkins and Facebook Places

Loading Comments for a Graph API object

In this recipe, we're going to load the comments for a given item on Facebook and display them using a Flex framework List component, using a further Item Renderer component to format the output, so that each comment looks more like this:

And less like this, which is what would happen without a custom Item Renderer:

Comments can be added to almost every Facebook object type, but for the purposes of this recipe, we're going to display the comments for a publicly-available photo object.

Because this photo is publicly available and because the comments attached to a Graph API object inherit their permissions from the object itself, there's no requirement for the user to be authenticated with Facebook in order to load the image data or the comments associated with it.

The object ID of the photo in question is 200843466599829. When loaded, this object should look like this:

Getting ready

The first thing we will want for this example is an interface. Create...