Holiday Presents from Facebook Platform
by Sasha Rush - December 27, 2007 at 12:56pm

The Facebook Platform team is always looking for ways to make your apps more responsive and simpler to manage. With these two goals in mind, we're happy to announce several new beta features.


1) Cookies and more. – Cookies are an integral feature of the web. They integrate into many popular frameworks and make it easy to manage user data, and now you can use cookies on Facebook canvas pages. An important difference is that these are associated with the app rather than with a particular domain. In addition, since they are stored on the Facebook server, you can query and set them even when the user is offline. Note that: Cookies without an ‘expires’ attribute will never expire. Since the cookies are stored with the user’s Facebook account, they get the benefit of having that state present across browsers and machines.

To supplement cookies, we also are introducing Preload FQL rules. These rules allow an app to specify parameterized FQL queries that are run when the user makes a request to the Facebook server. The results are then passed to your app server as post params.

2) Improved AJAX support - Many apps already use FBJS in innovative ways, and as part of this release we offer improved AJAX capabilities in FBJS. The new feature is a local proxy that allows you to make direct async requests back to your application server. This trick lets you to gain all the advantages of FBML without needing to use an embedded IFrame. To make this ability even more useful, we also now provide a DOM function setInnerXHTML that lets you to modify your canvas page by adding a string of HTML.

3) Cached Include files – To further speed up canvas pages, we now allow you to specify link tags on canvas pages that point to external CSS files, in addition to script src tags to point to FBJS files. This saves the processing time of sending these files through our sanitizer on each request and caches these files on the user's browser.


4) Admin API - Users with multiple apps often complain about having to go through the developer console to update application settings. We now offer an Admin API that lets you set and query settings for your apps. Going forward, this will allow us to associate more complex programmatic data with apps and support third-party app management tools.

To find out more about all these features, check out the Beta Features category on the wiki.

Happy Holidays!