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

Adding a Comment to a Graph API object

Comments for a Graph API object are linked to the object through their Graph API connection, so to add a new comment, what we need to do is post an appropriately formatted object to the object's connection URL.

In this recipe, we're going to extend our comments loading application from the previous recipe to include the ability to post a comment on to an existing Graph API object.

Getting ready

Adding objects to the Graph API on a user's behalf requires that our application be authenticated as that user, along with the publish_stream Extended Permission. An easy way to ensure that our application has this Extended Permission is to use the ApplicationBase class that we develop in the recipe Creating the ApplicationBase class from Chapter 11, Bridging the Flash and Application Gap

To test this functionality, we'll build an interface which can be used to create new comments. In addition to the components and layout from our previous recipe, we need to create...