Recently I have been working on working with a Facebook application which resides within an iframe. However, the application could change size as the UI state changed, and the iframe needed to change size to match.
Luckily for me Facebook provide a prebuilt solution for this which you can drop into your page with only a few lines of Javascript. They even provide a demo application.
Unluckily for me, after following Facebook’s instructions perfectly, the resizing didn’t work!