Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

New Facebook app - FBML or iFrame? [closed]

Tags:

facebook

api

We're starting a new facebook app (incidentally in Rails), and are faced with the decision to use FBML or to use IFrames. It seems like in the past the consensus generally was that FBML was the better way to go, as it made things more inherently Facebook looking, however it seems now like things on the iFrame side are starting to improve, with one of their main engineers saying we should use iframes

So I'm wondering what have people found to work best. What benefits and drawbacks have you seen with either the iFrame approach, or the FBML approach.

Or, are people using a mix of both. I see there's a way you can override the setting in specific places.


UPDATE:
For new readers, Facebook has stopped allowing new FBML applications. All new Apps should use IFrames.

like image 211
Cameron Booth Avatar asked Oct 20 '08 20:10

Cameron Booth


People also ask

Can I embed iframe in Facebook?

Adding Iframe App to your Facebook PageGo to your Facebook page and on the search bar enter “Static HTML: iframe tabs” or visit this link https://apps.facebook.com/static_html_plus.

What is iframes Facebook?

In its purest form, an iFrame is an HTML element that allows you to pull in an HTML document.


1 Answers

I have been developing a facebook app for the past several months, and recently switched our canvas page from FBML to an IFrame. The main reason for doing so has to do with these posts and features:

Lead Facebook Engineer Recommends Developers Use IFrames for Speed, Convenience

XFBML - Facebook Developer Wiki

Basically, you can now embed FBML into an IFrame canvas using the XFBML features that were implemented to support Facebook Connect. IFrames may have performance improvements (although those are probably trashed by the client-side requests required by XFBML, which are a little tedious to set up at first), but the main advantages for me are:

1) The ability to use jQuery or any other stuff I want.

2) Useful, relevant ads from adsense, since I no longer have to embed the adsense javascript in its own IFrame.

Once I made this switch, I realized that I was able to get all the facebook data I needed through the API, and take advantage of memcached to improve performance. So, now my canvas is just plain old HTML, without any XFBML.

Hope this helps.

like image 176
jmans Avatar answered Sep 20 '22 23:09

jmans