Down and Dirty

Over the previous three weeks I was working with my old pals at Greenroom Digital, who were producing a Facebook application for their client Paramount Pictures. The app’s release coincided with Paramount’s release of South Park Season 6 on DVD. You won’t be surprised to see that the application is crude and puerile, and you may [as I do] reluctantly find it pretty amusing in places.

You can see the South Park Down and Dirty application in action here. This link is my public Down and Dirty profile and does not require you to add the app, although you can add it here in the usual fashion.

Pick up Campaign or some such publication and no doubt you’ll be able to read all about the strategy, the creative, the design, even the metrics. Less likely you’ll read about the technical execution, which is where I come in…

I joined the team once the creative and design had been signed off, and from that point I was sole developer on the project. This meant developing the back end, (PHP/MySQL), and front end (FBML/CSS) and quite a bit of non-trivial Flash content (AS2). The total development time from briefing to launch was 13 days – 13 long, hard days.

This project threw up some interesting technical points worth mentioning. If you are interested in any of these topics, let me know and I’ll write a more in depth article on each;

First up was the seemingly trivial problem of linking to parts of the app from within Flash content. Something even the least technical Flashers have been doing for years. However, this was until Adobe implemented this security feature in the Flash Player. This led me to implement all Flash content across the app within iframes, as opposed to using Facebook’s fb:swf tag.

The good old Flash security model came into play on this project too. Loading images directly from Facebook’s servers into a third party Flash app is not a problem if all you want to do is display the image. This is all I needed to do in my first ever Facebook app FBPlayer. This can be achieved simply with the MovieClipLoader, but as advanced Flashers will know, if you want to do anything remotely cool you need to use the wonderful BitmapData class. Take note: an image that has been loaded into Flash from outside your sandbox is subject to the same security lockdown as an external SWF. In a nutshell – it is not scriptable! Therefore BitmapData.draw() does not work on the image data. The obvious solution is an image proxy. Not difficult in the least and one has to wonder what the point in this security feature really is when it is so easily circumvented with a perfectly legitimate technique. The image proxy I implemented in PHP was about 12 lines long [excluding library code], and took all of 5 minutes to write and test.

Another surprise was related to Facebook privacy. Accessing friends’ photo albums via the API was yielding empty results in some cases – It transpires that plenty of punters are aware they can block applications from accessing their data. This is obviously not the default setting, but as more people become aware of these capabilities the functionality of apps like Chin Balls become more restricted because users’ friends have to be more willing participants. Although I support this approach in sentiment, it unfortunately increases applications’ need to persuade people to add in order to function, which makes apps more irritating and ‘spammy‘.

This does not necessarily mean you must add an application to interact with it at all. A little known fact [it seems] is that a Facebook canvas page is viewable by anyone logged into a Facebook account. The only reason you see immediate ‘add application‘ prompts is that the app authors are being pushy and lazy. The South Park app has a public profile page where you can see the same content that I can see. You do not need to add the app to see my profile. – Why? – Because this functionality does not require the app to know who you are. In fact it cannot know even your user id until you authorize it. When you view this page the app is using my authorization for you to see the content. Why not give new users an experience up front and let them decide if thy like the app before being coerced into adding it? There are privacy issues at stake here too of course, but I am blithering on enough as it is. Let me know your thoughts!