Facebook App Development 101 Intro to the Platform/Building your first Facebook App Professor R. Tyler Ballance Slide, Inc. tyler@slide.com
Meet the Professor I work at Slide, Inc.
Meet the Professor I write Facebook apps.
Meet Ari Works on the platform
Facebook App Dev 101 Introduction to the Facebook Platform Facebook Developer Resources Platform Client Libraries Dissecting Why are you awesome? LUNCH! Building an application Testing your application Metrics?
Introduction to the Platform
Welcome to the Facebook Platform
Welcome to the Facebook Platform Dave McClure is attending Graphing Social Tony Hsieh left the group Tony Hsieh For President David Young added a new video to a group. Kara Swisher and Mark Zuckerberg ended their relationship. Adora Cheung added FunWall Kevin Ho is feeling graphical. Lee Lorenzen plans to attend Widget Summit Mike Huang updated his profile. He edited his interests and profile picture. Will Liu is no longer listed as single. Kasey Kirkham added new photos. Keith Rabois attended CommunityNext Platform Adora and Daniel Kim are now friends. Max Levchin updated his Top Friends Jared Fleiser has thrown a sheep at Sonya Chawla Nik Gandhy wrote on Lennisse Ambriz s w A black blue box of social information
Developer Resources
Developer Resources Test Console http://developers.facebook.com/tools.php Bugzilla http://bugs.developers.facebook.com/ Developer Application http://www.facebook.com/developers/ Developer Wiki http://wiki.developers.facebook.com
Subscribe to Platform Feeds
Report good bugs
IRC Channel
Technically Speaking
<fb:hello/> How do you communicate with Facebook? XML JSON HTTP Request
Is Zuckerberg my friend? XML Response <xml>no</xml> <?xml version="1.0" encoding="utf-8"?> <friends_arefriends_response xmlns="http://api.facebook.com/1.0/" xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xsi:schemalocation="http:// api.facebook.com/1.0/ http://api.facebook.com/1.0/facebook.xsd" list="true"> <friend_info> <uid1>627205543</uid1> <uid2>4</uid2> 412 bytes <are_friends>0</are_friends> </friend_info> </friends_arefriends_response> { um : NO! } JSON Response 53 bytes [{"uid1":"627205543","uid2":"4","are_friends":false}]
Friends UIDs 697 friends JSON XML 16KB 44KB SELECT uid1 FROM friend WHERE uid2 = 627205543
Facebook Client Libraries
PHP Cons Only works with XML Pros Super-easy to use. (like BASIC, but with dollar signs) Written in PHP Officially supported Conducive to spaghetti code Wider variety of hosting options
Python Cons Shared hosts don t tend to support Python Uses simplejson by default Slightly larger learning curve for beginners Pros Very well written API Supports JSON/XML by default Easily integrated with Django Good enough for Slide
Ruby Cons Difficult to move from PHP to Ruby Bends the rules on how to write RESTful code Pros Scales well Ruby on Rails can be very clean Easy to write poorly performing code Rails encourages automated testing. Not quite conforming to Very Web 2.0 Ruby coding standards
.NET Cons IIS, or mod_mono Some aspects require.net 3.5 Very enterprisey and complicated Tied to XML with a noose Pros A variety of existing UserControls Usable from C#, or VB.NET Tight integration with Visual Studio LINQ support Very well documented
Other Libraries ColdFusion Perl Java C++
More Cons Platform moves too quickly Marketplace API Status API Data Store API Very little shared coding standards Everybody s reinventing the wheel
Dissecting Why are you awesome?
What it is yo. Owl == AWESOME
Owl Post-Install Call to action Social context
fb:dashboard Post-Install fb:action fb:profile-pic regular form fb:name regular links
Changin State fb:success
Notify. Rinse. Repeat. fb:notif-page
IN UR PROFILEZ auto-generated fb:pronoun OMFG LAME
IN UR PROFILEZ fb:name fb:profile-pic Mock AJAX d
IN UR PROFILEZ fb:error
Zee Codes
Building your first application
Testing your Facebook application
Use basic unit testing Application Logic phpunit
Metrics, engagement and fun numbers
Closure