I’m at Graphing Social Patterns for the next three days; it’s a conference revolving around the Facebook platform. I’ve watched Giles live-blog and he always does it so well (and I always appreciate it when he does) so here goes:

Presented by R. Tyler Ballance of Slide, Ari Steinberg of Facebook

Useful URLs:

API console and FBML console, which returns to you exactly what your app will see: http://developers.facebook.com/tools.php

They just added bugzilla: http://bugs.developers.facebook.com/
Developer FB App: http://www.facebook.com/developers/
Developer docs and wiki.developers.facebook.com

Subscribe to the platform status feed to keep up with what’s working/broken at the moment: http://www.facebook.com/feeds/api_messages.php

IRC: #facebook @ irc.freenode.net

Use JSON. It’s much more compact compared to XML (~3x in some common cases), keeps bandwidth costs low and interactive response high.

FB is mostly PHP.

Pros & Cons of FB app langs:

Pro: super easy to write, officially supported, wide variety of hosting
Con: Only does XML with FB; PHP makes it easy to write crap

Python: (PyFacebook API)
Pro: supports JSON or XML; integrates with Django easily
Con: hosting folks don’t often host mod_python; uses simplejson by default (cjson is 70-80% faster); Python has a steeper learning curve

Ruby: (rFacebook API/lib)
Pro: RoR scales well; RoR encourages clean, readable code; RoR encourages testing; “Very Web 2.0”
Con: Ruby has an even higher learning curve; rFacebook isn’t as RESTful as it could be; “really easy to write bad code in Ruby”, “rFacebook doesn’t quite conform to Ruby coding standards”

.NET: (Mono)
Pro: A variety of existing UserControls; usable from C# or VB.NET; tightly integrated with Visual Studio; supports LINQ (new feature in .NET 3/IIS); *very* well documented (70pp of very detailed docs)
Con: IIS or mod_mono/Apache2 (latter not fully supported); some aspects require .NET 3.5; very “enterprisey” and complicated (separates biz logic from display layer, etc); tightly bound to XML.

Other libs: ColdFusion, Perl, Java, C++

FB Platform is moving so quickly be sure that your chosen client lib can keep up.

Ari: if you know what you’re doing, you can crank out your own FB API lib in The Language Of Your Choice in ~1-2 hrs.

Example app: “Why are you awesome?” written in PHP4, FBML-based, with only one request for info from FB.

The user needs to be called to action – they need to add info, do stuff, manage something, or something else in order to be engaged. Find intriguing social contexts that engage folks.

Work hard to stay within FB’s UI look and feel to increase user comfort. Compare Friends is an excellent example of going far, far away from it.

Make sure to add notifications to increase awareness of your app. Make sure they’re not spammy, or people will mark them as spam and you’ll be restricted to being seen only by your app’s users.

Brevity is the soul of wit.

Use Mock AJAX to provide some cool interactivity.

There’s a limit of 40 notifications per day, 10 user-to-user invites per day. Ari: “Ideally, we’d like to have the limits not exist [and everyone to behave sensibly] … we just have the limits there to keep things from getting out of control.”

FBML-based apps:

  • Don’t have to fetch tons of info (reduces your load). Free gifts is installed ~5M users, 500-900K daily users, and one server.
  • Fewer FB API calls == less exposure to bandwidth latency, etc.
  • Loads about as fast as the rest of FB, very responsive feeling.
  • FBBYB: FB bugs become your bugs (and users don’t make any distinction)
  • FB has had issues with unicode
  • Keep FB’s bugzilla handy all-the-time

iFrame/HTML-based apps:

  • You’ve got nearly absolute control (some browsers may not allow iFrames to set cookies, so do a page reload)
  • Easier to port existing web apps
  • Only constrained to 696 pixel width and terms of service (which you really need to read, particularly about what you can do with data or persistence).
  • You have to call the FB API (lots), which can increase load on servers
  • You don’t have access to FBML
  • You can totally hose the user experience (viz. scrolling iframes, bad self-written controls)

General Tips:

  • Pick what you’re most comfy with – what you can ship fastest
  • Subscribe to dev feeds; monitor FB’s changes often.
  • Use JSON.
  • You can get an infinite session key using require install (vs. require login).
  • require add will force the user to add the app before interacting, but they may not opt in just to test things

Let there be lunch and app-hacking afters.

blog comments powered by Disqus


07 October 2007


facebook graphing.social hacking social networks