Index: fb_form.module
===================================================================
--- fb_form.module	(revision 2804)
+++ fb_form.module	(working copy)
@@ -46,7 +46,19 @@
       fb_canvas_is_fbml()) {
     $form['#after_build'][] =  'fb_ahah_bind_form';
   }
-  
+
+  // Support for ahah within iframe canvas. The ahah js connection is done with a new session id, here we
+  // create a hidden form field with the session_id, that is used by fb_session.inc through the $_REQUEST
+  // This is needed in the case that that there is only a fb canvas application without fb connect, because
+  // there is no sessions_id's in the cookies.
+  if ((function_exists('fb_canvas_is_iframe') && fb_canvas_is_iframe()) && array_keys($form, '#ahah')) {
+    $form['fb_forms_iframe_session_id'] = array (
+      '#type' => 'hidden',
+      '#default_value' => session_id(),
+      '#tree' => TRUE,
+    );
+  }
+
 }
 
 /**
