Facebook Graph API Development with Flash

Book description

Build social Flash applications fully integrated with the Facebook Graph API

  • 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

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.

Everything you need to know from integrating applications and games to searching, retrieving, and updating data on Facebook

Table of contents

  1. Facebook Graph API Development with Flash Beginner's Guide
    1. Table of Contents
    2. Facebook Graph API Development with Flash Beginner's Guide
    3. Credits
    4. About the Author
    5. Acknowledgement
    6. About the Reviewer
    7. www.PacktPub.com
      1. Support files, eBooks, discount offers and more
        1. Why Subscribe?
        2. Free Access for Packt account holders
    8. Preface
      1. What this book covers
      2. What you need for this book
      3. Who this book is for
      4. Conventions
      5. Reader feedback
      6. Customer support
        1. Errata
        2. Piracy
        3. Questions
    9. 1. Introduction
      1. What's so great about Facebook?
        1. It's popular
          1. Numbers
        2. It's everywhere
        3. It's interesting to develop for
        4. Have a go hero – get on Facebook
      2. Web hosts
        1. What's a web host?
        2. Why do you need one?
        3. How do you choose one?
        4. Useful software
        5. What about domain names?
        6. Have a go hero – get a web host, upload to it, test
      3. How much AS3 knowledge is required?
      4. The source code
        1. Powered by…
        2. Debugging
          1. Watch out for caching
      5. A final note…
    10. 2. Welcome to the Graph
      1. Accessing the Graph API through a Browser
      2. Time for action – loading a Page
        1. What just happened?
        2. Have a go hero – exploring other objects
      3. Accessing the Graph API through AS3
      4. Time for action – retrieving a Page's information in AS3
        1. What just happened?
      5. Time for action – deserializing a JSON object
        1. What just happened?
      6. Time for action – visualizing the info
        1. What just happened?
      7. Understanding connections
      8. Time for action – finding connections in a browser
        1. What just happened?
        2. Have a go hero – exploring connections
        3. Rendering Lists
      9. Time for action – rendering Lists of Posts
        1. What just happened?
        2. Rendering connections
      10. Time for action – displaying a Graph Object's connections
        1. What just happened?
          1. Introducing the Requestor
      11. Time for action – creating an HTTP Requestor
        1. What just happened?
      12. Understanding Connections of Connections
      13. Time for action – loading photos from an album
        1. What just happened?
      14. Putting it all together
      15. Time for action – traversing the Graph
        1. What just happened?
        2. Have a go hero – exploring other areas
        3. Pop Quiz
      16. Summary
    11. 3. Let Me In!
      1. What can you see?
      2. Time for action – snooping through other people's accounts
        1. What just happened?
        2. Have a go hero – viewing your privacy settings
      3. What's that got to do with the Graph API?
        1. Access tokens are proof of authorization
        2. User/Application authorization
      4. Time for action – registering an application with Facebook
        1. What just happened?
        2. Application ID + logged-in user = access token
      5. Time for action – requesting an access token with the browser
        1. Registering a redirect URI with our application
        2. Using the Access Token
        3. Me, me, me
        4. What just happened?
          1. Keeping secrets
          2. What did Facebook give us?
      6. Authenticating with AS3
      7. Time for action – Using an access token in our Graph visualizer
        1. That's cheating!
      8. Time for action – authenticating through the application
        1. What just happened?
        2. A different approach
      9. Time for action – authenticating via JavaScript
        1. Creating a callback web page
        2. Receiving the access token
        3. What just happened?
          1. What about users who haven't used the application before?
        4. Have a go hero – dealing with the undecided
      10. Extended permissions
      11. Time for action – obtaining extended permissions
        1. What just happened?
      12. Time for action – requesting extended permissions
        1. Have a go hero – using a permanent access token
          1. I want it all, and I want it now
        2. Have a go hero – dealing with extended permissions
      13. Using the Adobe ActionScript 3 SDK for Facebook platform
      14. Time for action –implementing the SDK
        1. What just happened?
        2. Have a go hero – requesting extended permissions with the SDK
        3. Pop Quiz
      15. Summary
    12. 4. Digging Deeper into the Graph
      1. Getting more results with paging
      2. Time for action – displaying the number of objects in a list
        1. What just happened?
      3. Time for action – requesting more Objects
        1. What just happened?
      4. Time for action – requesting more Objects at once
        1. What just happened?
          1. Paging
      5. Time for action – obtaining data in pages
        1. What just happened?
        2. Have a go hero – using limit and offset for other connections
      6. Time for action – adding limit and offset to GraphRequest instances
        1. What just happened?
          1. Date-Based filtering
      7. Time for action – requesting data based on date
        1. What just happened?
      8. Time for action – adding since and until to GraphRequest instances
        1. What just happened?
      9. Time for action – filtering by date using the UI
        1. What just happened?
          1. We gon' partition like it's yo' birthday
        2. Have a go hero – loading birthday wall posts
        3. Date-based paging
          1. Requesting multiple IDs at once
      10. Time for action – using the ids parameter in a Graph URL
        1. What just happened?
        2. Have a go hero – creating a Compound Object based on results from a List
      11. Summary
        1. Pop Quiz
    13. 5. Search Me
      1. Using the website's Search box
      2. Time for action – examining quick search results
        1. What just happened?
      3. Time for action – Using the Full Search results
        1. What just happened?
      4. Searching with a Graph URL
      5. Time for action – searching without authorization
        1. What just happened?
      6. Time for action – searching while authorized
        1. What just happened?
        2. Differences
        3. Restrictions
      7. Time for action – implementing a Search window in the Visualizer
        1. What just happened?
      8. Time for action – searching via the SDK
        1. What just happened?
        2. Have a go hero – setting the locale
        3. Searching feeds and wall posts
      9. Time for action – searching your news feed
        1. What just happened?
      10. Time for action – searching a friend@#U+0027:s Wall Posts
        1. What just happened?
      11. Time for action – searching feeds through the Visualizer
        1. What just happened?
      12. Summary
        1. Pop Quiz
    14. 6. Adding to the Graph
      1. Hello, Facebook!
      2. Time for action – posting to the user's feed
        1. Request methods
          1. What's a request method?
      3. Time for action – using the POST method
        1. What just happened?
      4. Time for action – listening for errors
        1. What just happened?
      5. Time for action – granting the required permission
        1. What just happened?
      6. Time for action – posting via the SDK
        1. What just happened?
      7. Going further with Wall Posts
      8. Time for action – publishing rich posts
        1. What just happened?
        2. Have a go hero
      9. Posting to another Wall
      10. Time for action – posting to another Wall using the Visualizer
        1. Actions, privacy, and source
          1. Actions
      11. Time for action – literally
        1. What just happened?
          1. Privacy
      12. Time for action – setting a Post's privacy settings
        1. What just happened?
          1. Source
      13. Deleting Graph Objects
      14. Time for action – deleting a Post
      15. Time for action – deleting Posts using the Visualizer
        1. What just happened?
      16. Publishing other kinds of Graph Object
        1. Comments
        2. Likes
          1. What about "liking" other Graph Objects?
        3. Deleting Likes
        4. Notes
          1. Events
          2. Event RSVPs
          3. Albums
          4. Photos
          5. Checkins
      17. What about...?
        1. Sending inbox messages
        2. Creating Pages, Groups, Applications, and Videos
        3. Changing biographical information
        4. Making Friends
        5. Inviting Friends to Events
        6. Pop Quiz
      18. Summary
    15. 7. FQL Matters
      1. What is FQL?
      2. Understanding the FQL interface
        1. Models of data
        2. Representations of data
      3. Getting information
      4. Time for action – retrieving info from the Page table
        1. What just happened?
        2. Have a go hero – creating an FQL query builder
      5. What about connections?
        1. Photos, Albums, and their Owners
        2. Have a go hero – getting a user's albums
        3. Primary keys
        4. Crow's feet
        5. Have a go hero – drawing your own crows' feet
        6. Link tables
        7. What just happened?
      6. Time for action – getting a user's friends' names with AS3
        1. What just happened?
      7. Time for action – an easier way
        1. What just happened?
      8. Time for action – getting it down to one API call
        1. What just happened?
        2. Have a go hero – Mutual friends
      9. The Graph as a layer
        1. Have a go hero – recreating existing Graph API calls in FQL
      10. Permissions
        1. Checking existing permissions
          1. Getting more information
      11. Restrictions
        1. Searches must use an indexable field
          1. Does this matter in practice?
      12. Advanced FQL
        1. Operators
          1. Comparison
          2. Logical
        2. Have a go hero – getting a list of your events based on location
        3. Have a go hero – finding gatecrashers
        4. Ordering
        5. Paging
        6. Extra functions
        7. Have a go hero – combining what you've learned
        8. Calling multiple queries at once
        9. Pop Quiz
      13. Summary
    16. 8. Finishing Off
      1. Putting it online
        1. On Facebook
          1. IFrame
      2. Time for action – setting up an IFrame application
        1. What just happened?
          1. Page tab
      3. Time for action – adding an application to a Page tab
        1. What just happened?
        2. Off Facebook
          1. Your own website
          2. Flash game portals
          3. As a desktop AIR application
      4. Time for action – authorizing through AIR with HTTP
        1. What just happened?
      5. Time for action – authorizing through AIR with the SDK
        1. What just happened?
          1. As an AIR for Android Application
      6. Time for action – authorizing on Android
        1. What just happened?
        2. Have a go hero – modifying the SDK for Android
          1. Choosing your application's Facebook settings
      7. Getting your application out there
        1. Editing the application's profile page
        2. Have a go hero – creating your application's profile page
          1. Custom tabs
        3. The Facebook Application Directory
      8. Watch out for these policies!
      9. What next?
        1. The Official AS3 Facebook SDK
        2. Other Facebook APIs
        3. JavaScript SDK
          1. Insights API
          2. Facebook Chat API
          3. Internationalization API
        4. Adobe Social service
        5. Related Technologies
          1. PHP
          2. Open Graph Protocol
          3. Real-Time Updates
        6. Brand new and coming soon
          1. Facebook Credits
          2. Test users
          3. The New Messages
        7. Facebook developer resources
          1. Official Facebook resources
          2. Other great websites
          3. Me, me, me
      10. Keeping up with the Zuckerbergs
        1. Dealing with change
      11. Summary
    17. A. Pop Quiz Answers
      1. Chapter 2
      2. Chapter 3
      3. Chapter 4
      4. Chapter 5
      5. Chapter 6
      6. Chapter 7
    18. Index

Product information

  • Title: Facebook Graph API Development with Flash
  • Author(s): Michael James Williams
  • Release date: December 2010
  • Publisher(s): Packt Publishing
  • ISBN: 9781849690744