Free Sample
+ Collection

Facebook Graph API Development with Flash

Michael James Williams

Build social Flash applications fully integrated with the Facebook Graph API
RRP $26.99
RRP $44.99
Print + eBook

Want this title & more?

$12.99 p/month

Subscribe to PacktLib

Enjoy full and instant access to over 2000 books and videos – you’ll find everything you need to stay ahead of the curve and make sure you can always get the job done.

Book Details

ISBN 139781849690744
Paperback324 pages

About This Book

  • Build your own interactive applications and games that integrate with Facebook
  • Add social features to your AS3 projects without having to build a new social network from scratch
  • Learn how to retrieve information from Facebook's database
  • A hands-on guide with step-by-step instructions and clear explanation that encourages experimentation and play

Who This Book Is For

If you are an AS3 developer who wants to create applications and games that integrate with Facebook – either on the Facebook website itself or off it, then this book is for you. Even if you have no previous experience with Facebook, databases, or server-side programming , you can count on this book.

Table of Contents

Chapter 1: Introduction
What's so great about Facebook?
Web hosts
How much AS3 knowledge is required?
The source code
A final note…
Chapter 2: Welcome to the Graph
Accessing the Graph API through a Browser
Time for action – loading a Page
Accessing the Graph API through AS3
Time for action – retrieving a Page's information in AS3
Time for action – deserializing a JSON object
Time for action – visualizing the info
Understanding connections
Time for action – finding connections in a browser
Time for action – rendering Lists of Posts
Time for action – displaying a Graph Object's connections
Time for action – creating an HTTP Requestor
Understanding Connections of Connections
Time for action – loading photos from an album
Putting it all together
Time for action – traversing the Graph
Chapter 3: Let Me In!
What can you see?
Time for action – snooping through other people's accounts
What's that got to do with the Graph API?
Time for action – registering an application with Facebook
Time for action – requesting an access token with the browser
Authenticating with AS3
Time for action – Using an access token in our Graph visualizer
Time for action – authenticating through the application
Time for action – authenticating via JavaScript
Extended permissions
Time for action – obtaining extended permissions
Time for action – requesting extended permissions
Using the Adobe ActionScript 3 SDK for Facebook platform
Time for action –implementing the SDK
Chapter 4: Digging Deeper into the Graph
Getting more results with paging
Time for action – displaying the number of objects in a list
Time for action – requesting more Objects
Time for action – requesting more Objects at once
Time for action – obtaining data in pages
Time for action – adding limit and offset to GraphRequest instances
Time for action – requesting data based on date
Time for action – adding since and until to GraphRequest instances
Time for action – filtering by date using the UI
Time for action – using the ids parameter in a Graph URL
Chapter 5: Search Me
Using the website's Search box
Time for action – examining quick search results
Time for action – Using the Full Search results
Searching with a Graph URL
Time for action – searching without authorization
Time for action – searching while authorized
Time for action – implementing a Search window in the Visualizer
Time for action – searching via the SDK
Time for action – searching your news feed
Time for action – searching a friend@#U+0027:s Wall Posts
Time for action – searching feeds through the Visualizer
Chapter 6: Adding to the Graph
Hello, Facebook!
Time for action – posting to the user's feed
Time for action – using the POST method
Time for action – listening for errors
Time for action – granting the required permission
Time for action – posting via the SDK
Going further with Wall Posts
Time for action – publishing rich posts
Posting to another Wall
Time for action – posting to another Wall using the Visualizer
Time for action – literally
Time for action – setting a Post's privacy settings
Deleting Graph Objects
Time for action – deleting a Post
Time for action – deleting Posts using the Visualizer
Publishing other kinds of Graph Object
What about...?
Chapter 7: FQL Matters
What is FQL?
Understanding the FQL interface
Getting information
Time for action – retrieving info from the Page table
What about connections?
Time for action – getting a user's friends' names with AS3
Time for action – an easier way
Time for action – getting it down to one API call
The Graph as a layer
Advanced FQL
Chapter 8: Finishing Off
Putting it online
Time for action – setting up an IFrame application
Time for action – adding an application to a Page tab
Time for action – authorizing through AIR with HTTP
Time for action – authorizing through AIR with the SDK
Time for action – authorizing on Android
Getting your application out there
Watch out for these policies!
What next?
Keeping up with the Zuckerbergs

What You Will Learn

  • Make your AS3 projects more social and personalise them for your users by adding Facebook integration
  • Grab information directly from Facebook into your applications by using Facebook's Graph API
  • Securely authenticate your users with OAuth 2.0 to log them into Facebook
  • Access information about your users and their friends directly from Facebook – no need to make them type it all in again
  • Upload photographs, add wall posts, and create events through AS3
  • Search on Facebook's databases with the powerful Facebook Query Language
  • Build an AS3 Facebook SDK that you can drop into any AS3 project to add Facebook integration
  • Easily access both public and private Facebook data from the surface of a graph
  • Learn with exercises and fun examples illustrated with diagrams and screenshots


In Detail

The Facebook platform provides you with an ideal solution for building rich, social experiences on the web to develop an effective user experience application. Combined with Flash which effectively enables social interactions, you can create a fully functional application on Facebook. If you've been waiting to get started with your own applications and games on Facebook, with this book you don't have to wait any longer.

This book takes you through everything you need to know to integrate your AS3 apps and games with Facebook accompanied by illustrative screenshots and short quizzes.It presents you with in depth coverage of the key underlying concepts such as creating a basic application that runs inside Facebook and exploring the Graph API which greatly simplifies how developers can retrieve data. This book also covers topics on security, permissions and authentication features on Facebook.

This beginner's guide starts off by teaching you about retrieving simple public data and then rapidly working your way up to authenticating users, building powerful searches across the entire database, and uploading photos and other content.

Throughout the book, you'll learn by building two fundamental components: an RIA Facebook interface and an AS3 SDK that you can drop into any project to add Facebook integration. This easy-to-understand guide has everything written as AS3-only projects with publicly available components, so you can follow along whether you use Flash Pro, Flex, or MXMLC – as long as you know AS3!

This hands-on tutorial will present you with a whole new perspective of the three core aspects of Facebook – searching, retrieving, and updating the data .This practical book focuses on how to set up an application on Facebook and how to deal with different contexts like AIR.

By the end of this book, you will be confident enough to set up your own application and create social interactions for users to share on Facebook.


Read More