Author
dave-mcclure
View
38.811
Download
0
Embed Size (px)
Facebook App Development 101
Intro to the Platform/Building your first Facebook App
Professor R. Tyler BallanceSlide, Inc.
I work at Slide, Inc.
Meet the Professor
Meet the Professor
I write Facebook apps.
Meet Ari
Works on the platform
Facebook App Dev 101Introduction 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
A black blue box of social information
Dave McClure is attending Graphing Social
Keith Rabois attended CommunityNext Platform
Max Levchin updated his Top FriendsWill Liu is no longer listed as single.
David Young added a new video to a group.
Tony Hsieh left the group Tony Hsieh For President
Nik Gandhy wrote on Lennisse Ambriz’s wall.Kasey Kirkham added new photos.
Kara Swisher and Mark Zuckerberg ended their relationship.
Jared Fleiser has thrown a sheep at Sonya Chawla
Kevin Ho is feeling graphical.
Mike Huang updated his profile. He edited his interests and profile picture.
Adora and Daniel Kim are now friends.
Lee Lorenzen plans to attend Widget Summit
Adora Cheung added FunWall
Welcome to the Facebook Platform
Developer Resources
Developer Resources
Test Consolehttp://developers.facebook.com/tools.php
Bugzillahttp://bugs.developers.facebook.com/
Developer Applicationhttp://www.facebook.com/developers/
Developer Wikihttp://wiki.developers.facebook.com
Subscribe to Platform Feeds
Report good bugs
IRC Channel
Technically Speaking
<fb:hello/>
HTTP Request
JSON
XML
How do you communicate
with Facebook?
Is Zuckerberg my friend?
<?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> <are_friends>0</are_friends> </friend_info></friends_areFriends_response>
XML Response<xml>NO</xml>
[{"uid1":"627205543","uid2":"4","are_friends":false}]
JSON Response
{‘um’: ‘NO!’}
412 bytes
53 bytes
Friends’ UIDs
697 friends
JSON XML
16KB 44KB
SELECT uid1 FROM friend WHERE uid2 = 627205543
Facebook Client Libraries
PHPCons Pros
Only works with XML
Written in PHP
Super-easy to use.(like BASIC, but with dollar signs)
Conducive to
spaghetti code
Officially supported
Wider variety of
hosting options
PythonCons Pros
Shared hosts don’t tend
to support Python
Uses simplejson by
default
Very well written API
Slightly larger learning
curve for beginners
Supports JSON/XML
by default
Easily integrated
with Django
Good enough for Slide
RubyCons Pros
Difficult to move from
PHP to Ruby
Bends the rules on how
to write RESTful code
Scales well
Easy to write poorly
performing code
Ruby on Rails can be
very clean
Rails encourages
automated testing.
Very Web 2.0Not quite conforming to
Ruby “coding standards”
.NETCons Pros
IIS, or mod_monoA variety of existing
UserControls
Very “enterprisey” and
complicated
Usable from C#, or
VB.NET
Tight integration
with Visual Studio
LINQ support
Very well documented
Some aspects
require .NET 3.5
Tied to XML with
a noose
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
Post-Install
Social context
Call to action
Owl
Post-Install
fb:action
fb:dashboard
fb:profile-pic
fb:name
regular form
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:profile-pic
fb:name
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