Posterous
Dan is using Posterous to post everything online. Shouldn't you?
Dantwitter_thumb
 

Dan Larsen’s posterous

my random ramblings about anything

« Back to blog

Facebook application development

After finishing the development of my 2nd Facebook application, I though it was to time to share some knowledge...

Both applications I have developed, is coded using FBML, therefore some of the following may only apply to FBML-based applications.

First of: I have discovered a hidden Facebook philosophy...
I have not heard any Facebook person speak this out loud, but while you develop an application, you will slowly discover the pracital truthness of it's existence, throughout every little aspect of the Facebook system...

The philosophy:
Everything WILL fail at one point. Some things will fail totally, some partly and yet some will never be fixed...

I have never come across such a perfect integration of Murphy's law

Let me just give you a coule of examples:

1) Facebook caches any image, that you use inside the application.
This is generally a good thing, that takes some load off your servers.
The problem arises, the moment you want to update some of the images.
Facebook's API has a function, for requesting an image cache flush.
While this generally works fine, it can fail - and when it fails... It will not let of the cache... AT ALL!
This leads to the following decision situation:
- rename the image and update all of your code
- or hope for the best...

2) Facebook translations seems like the perfect solution for translations.
You create some tags and the texts pops up in the translations interface.... niiiice!
Unfortunately, Facebook reads, cleans and rewrites your (x)HTML/(x)FBML, which often result in errornous texts - which of course pops up in the translations interface!
This of course also means, a not-translated text sometimes shows up in your application...
As if this is not enough, when you request the deletion of the transaltions, the texts may not pop back up in the interface.
A perfect example of this, is the translation for the Applications name and description...

3) I thought I would just give a final example, that shows how far these problems strecthes...
If you want to advertise your application on Facebook, you will discover it basically works like Google AdWords...
But... yet again... WYSINWYG - It's impossible to determine when you get 1.000 impressions or 1.000.000 impressions!
I have an ad, that one day got 141.000 impressions and another day <4.000 impressions... Even though I made sure to change max bid according to their suggestions!

A couple of areas I could have written about too:
Posting on the application users wall, when they are offline...
Using FQL (Facebook's SQL-like interface to their data) - I had to design a retrying FQL requester!!!
Asking for permissions from the user - NO! you can not ask for something you are already allowed to do, though Facebook explicitly says so...
And so on and so on and so on...

Well... My point with this?... I don't know... "BE WARNED" maybe?

 
Got an account with one of these? Login here, or just enter your comment below.
Posterous-login    Connect    twitter