Facebook App Woes

I’ve been working on a Facebook iframe app for the last few weeks, and it’s been an adventure to say the least.  For those that don’t know, there are two ways to develop Facebook apps, the iframe method, and the FBML method.  The iframe method allows you to basically embed content from your own server in an iframe within Facebook’s chrome, while passing back and forth the necessary Facebook data.  The FBML method provides you with a markup language that allows you to more tightly tie your app’s design in with the native look and feel of Facebook.  This route keeps all your content on Facebook’s servers.

For our app, we went with the iframe option, because we had lots of data exchanges going on with our own database, and users needed to upload pictures as part of using the app. During testing, (in various flavors of IE, Firefox, and Safari on both major platforms), no real problems were encountered with the functionality of the app that weren’t resolved before deploying. Once deployed, however, some users were encountering problems that seemed to be random glitches that we couldn’t really troubleshoot.  The API methods for getting a user’s photos sometimes didn’t return anything, no errors, no photos, nothing.  This actually seems to be a known problem, and an obviously annoying one.  Also, sometimes the user would be taken outside of the iframe, and directly to our server, which is obviously not ideal.  This was fixed with a kludgy workaround, where all links were pointed to the app’s URL on Facebook, with our URL parameters appended.  This, however, is going to make tracking less accurate with Google Analytics, since they are technically not links within the iframe any longer.

So I’m curious, has anybody else had problems when developing Facebook apps?  Does it feel as messy to you as it did to me?  It’s been an interesting experience, and I just hope I’m not the only one that feels this way after my first real Facebook app.

Comments

  1. Ken Hoskins Says:

    I have an app I have been working on for about a month. I went the iframe route also and it worked fine till today. All of a sudden it has started losing it’s frame like you experienced. I tried to prefix the pages with the facebook url but that causes it to have 2 frames. So I converted everything to FBML only to discover that a flash app won’t post back to my website when I do that. It has been a very frustrating day.

  2. Ben Says:

    Ken – if you prefix the URLs with the Facebook domain, e.g. http://apps.facebook.com/yourappname/yoururl – you need to add target=”_top” to the link to get it to load in the parent window, rather than inside the iframe.

  3. Rich Sadowsky Says:

    I’ve been working on a FB app for about a month too. I have found it much more difficult than it needs to be. For one the documentation is out of date or non-existent. Some standard things like google analytics don’t work properly in an iFrame. It looks like the FBML route supports a GA tag, but so far there is no apparent solution for an iFrame.

  4. Ben Says:

    Rich – I actually got the Analytics working by embedding the code the normal way. The Analytics actually point to the server where our app is hosted, rather than the Facebook URL. I agree though, it’s a pain in the ass ;)

Leave a Reply