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

Uploading Photos to Facebook


We can use the Graph API to upload an image file to Facebook by either sending the raw file bytes data or the bitmap data of the image to a Graph API Connection—which itself can be either a specific Album, /ALBUM_ID/photos, or a User's Photos connection, /PROFILE_ID/photos.

In this recipe, we're going to build a Flash Player-based application which leverages Flash Player 10+ FileReference class to build an application that can upload an image file from the user's local machine to either a new or existing Facebook Album.

In this recipe, we will be creating an interface which looks like this:

Such an interface allows us to upload Photos to either a user's existing Album or to the user's profile.

Getting ready

As with our previous recipe, we're going to develop our application on top of the ApplicationBase class, which handles the authentication process and validates that the current user has granted our application the required Extended Permissions; the permissions...