8/9/2019 Facebook Flash
http://slidepdf.com/reader/full/facebook-flash 1/19
Facebook Application architecture and Adobe Flash
Understanding the architecture of applicationsbuilt on the Facebook and Flash Platforms
8/9/2019 Facebook Flash
http://slidepdf.com/reader/full/facebook-flash 2/19
Session Highlights
Facebook's REST Interface The three facebook rendering modes
FBML
IFrame
XFBML
Flash
Flash FBML
Flash IFrame
8/9/2019 Facebook Flash
http://slidepdf.com/reader/full/facebook-flash 3/19
Facebook's REST Interface
Not a real RESTful interface No full use of CRUD
Requires session keys
Not resource oriented Server gateway is located at
http://api.facebook.com/restserver.php
Most calls are using HTTP GET Replies with XML (default) or JSON
8/9/2019 Facebook Flash
http://slidepdf.com/reader/full/facebook-flash 4/19
Facebook's REST Interface
Loginhttp://api.facebook.com/restserver.php?v=1.0& API Versionapi_key=...& Your API key call_id=...& Call ID, incrementalsig=...& Current call signature (MD5)method=auth.createToken Method name
Notificationhttp://api.facebook.com/restserver.php?notification=Text& Notification textmethod=notifications.send& Method namecall_id=...& Call ID, incremental
sig=...& Current call signature (MD5)type=app_to_user& Notification Typeapi_key=...& Your API key v=1.0 API Version
8/9/2019 Facebook Flash
http://slidepdf.com/reader/full/facebook-flash 5/19
FBML Application
Based on XML markup
Simple to learn
Rapid application development
Surprisingly good documentation
Not a lot of flexibility
No control over page content (CSS, JS/AJAX)
Bad performance
8/9/2019 Facebook Flash
http://slidepdf.com/reader/full/facebook-flash 7/19
IFrame Application
Maximum control over page content Minimal learning curve if you have past
experience
Faster user experience than FBML
Difficult to use the FBJS API
Minimal access to Facebook widget set
8/9/2019 Facebook Flash
http://slidepdf.com/reader/full/facebook-flash 9/19
XFBML
Made for external applications usingFacebook Connect
Provides a way to render Facebook widgets
on IFrame applications
Requires heavy knowledge in JavaScript
Subject to XSS attacks if used incorrectly Not all of FBML widgets are available
8/9/2019 Facebook Flash
http://slidepdf.com/reader/full/facebook-flash 10/19
Facebook Flash Applications
Facebook Flash API officially supported (AS3) Richer, more engaging user experience
3D is possible using Papervision3D
Still need server side code for authentication
Debugging is complicated
Insecure assignment of keys – avoidable butdifficult.
8/9/2019 Facebook Flash
http://slidepdf.com/reader/full/facebook-flash 11/19
Facebook Flash Application
There is no streight-forward way to use flashin Facebook applications
Still needs PHP to perform applicationauthentication to the facebook API, otherwise the
application will not get privilidges Flash API needs to authenticate against
Facebook as well
Two rendering methods have differentimplications on how your Flash applicationperforms
8/9/2019 Facebook Flash
http://slidepdf.com/reader/full/facebook-flash 12/19
Flash Application: FBML
Easy and quick to set up and run
No control over embedding, but Facebook
does the dirty work for you Limited JavaScript access through FBJS
No fullscreen support
8/9/2019 Facebook Flash
http://slidepdf.com/reader/full/facebook-flash 13/19
Flash Application: FBML
8/9/2019 Facebook Flash
http://slidepdf.com/reader/full/facebook-flash 14/19
Flash Application: IFrame
Requires more time to set up
Full control over embedding code
Fullscreen support is freely available
Full JavaScript communication between theFlash application and the Iframe
Full control over Flash session variables –Facebook's session variables must be passed
Facebook requires you to check for aspecific Flash version (v9.0.115 and up)
8/9/2019 Facebook Flash
http://slidepdf.com/reader/full/facebook-flash 15/19
Flash Application: IFrame
8/9/2019 Facebook Flash
http://slidepdf.com/reader/full/facebook-flash 16/19
Flash is insecure
If you build it, they will come API and Secret keys are stored plain text in
the SWF file, measures exist to bypass it
(IFrame mode only) User input is 'dirty' – always make the server
verify the input.
Bejewled Blitz test case
8/9/2019 Facebook Flash
http://slidepdf.com/reader/full/facebook-flash 17/19
Additional API Resorces
REST API Refrencehttp://wiki.developers.facebook.com/index.php/API
Facebook Signature Authenticationhttp://wiki.developers.facebook.com/index.php/Verifying_The_Signature
Flash API pagehttp://code.google.com/p/facebook-actionscript-api/
Flash API Documentations
http://facebook-actionscript-api.googlecode.com/svn/release/current/docs/index.html
Flash Examples (FBML only, insecure)http://www.socialgamefest.net/sessions/flash-fb-demos.zip
8/9/2019 Facebook Flash
http://slidepdf.com/reader/full/facebook-flash 19/19
Facebook Application architecture and Adobe Flash
Liran NunaSocial Game Fest
This presentationhttp://www.socialgamefest.net/sessions/facebook-flash.pdf
[email protected] (I don't bite)
Top Related