I Have seen alot of sample where the API key is hard coded into, unless you are building a desktop there is no need to do this. Facebook provides the API key, and the session key in the iframe url. Your application should retrieve the keys from the url, this makre your code more portable.
UPDATE – 9/10/10
With the new changes to face book app, make sure that you go into the advanced setting and check canvas session parameters.
Example of sharing a session:
fb= new Facebook();
var bytes:ByteArray = jpegencoder.encode(lastpumpyourselfbm.bitmapData);
var call:UploadPhoto = new UploadPhoto(bytes);
When you come to think of it web2.0 was about rich Internet applications, using platforms like Ajax. Flash and Siverlight. rich in the sense that they could function and animate as well as desktop applications. But web2.0 didn’t necessarily mean that you had a rich user experience. An example is Facebook here is a nice web2.0 application but it still lacked user experience, it was somewhat cumbersome in how I interact with parts of the web site( or web application).
Rich User Experience is what keeps the user engage. Engaging the user and keeping them engaged is a complex thing to so. Giving In you face content or the BAM! factor will cause some people to engage but not all users will respond the same way. I don’t believe that Rich User Experience has to always be something that is flashy or slick, It measured by the user time on your web site plus the re visiting of the user.
I believe that one can achieve this by building intelligent sites that offer a passive guidance to the user as he/she navigates the web site. Amazon has been doing this for years and are a good example. How good is a web site that I don’t engage with frequently.