Hey there. I have read the documentation thoroughly and have searched the queue.
I found this issue from August: http://drupal.org/node/555038 - where the $fb->fb_params property is sometimes empty (though sometimes it is not - it flips back and forth while navigating my app)
We are running the app as an iFrame (no canvas).
To resize the Frame in FB (so that no scrollbars are displayed around the frame), we used this suggestion (in a hook_fb function in our custom module):
if($op == FB_OP_INITIALIZE && fb_is_iframe_canvas()) {
fb_connect_require_feature("CanvasUtil");
drupal_add_js("$(document).ready(function() {FB.ensureInit(function() {FB.CanvasClient.startTimerToSizeToContent();});} )", 'inline', 'footer');
}
Sometimes it works and sometimes ... scrollbars.
So, I checked by doing this:
if($op == FB_OP_INITIALIZE) {
drupal_set_message("fb_is_iframe_canvas returns: " . fb_is_iframe_canvas());
drupal_set_message("fb_canvas_is_fbml returns: " . fb_canvas_is_fbml());
}
Whenever those functions return '1' (TRUE) then the scrollbar-killing magic works. But sometimes I get no value at all, which is another way of saying FALSE.
If I set those to always return true, then any link or form submit, takes me out of FB chrome and to a scrollbar-less page of my content, though if the content is too tall for the screen, you can't scroll down to the bottom. The fb_canvas_is_iframe function gets called at other times and doesn't always need to return TRUE, especially when viewing the site directly, without FB.
It seems that the $fb->fb_params is empty in those FALSE situations.
In the issue linked above, you suggest:
"Take a look at the fb_fbml theme, which can actually be used as either an fbml theme or an iframe theme (albeit with very little styling). Look at template.php, fb_fbml_page() function. See where it calls fb_canvas_process() before returning anything. Add code like this to your iframe theme."
But this was from August. I went into the fb_fbml theme for beta5 and could not find those functions called anywhere, so they must have been deprecated.
For now, we simply have the resize run without calling fb_is_iframe_canvas. We don't need to use the app site directly, and if we did, I would probably create another theme and have the code check for active theme before attempting to resize.
Still, I wonder why $fb->fb_params is empty sometimes.
Cheers, Dave.