You are here

function fb_exit in Drupal for Facebook 6.3

Same name and namespace in other branches
  1. 5.2 fb.module \fb_exit()
  2. 5 fb.module \fb_exit()
  3. 6.2 fb.module \fb_exit()
  4. 7.3 fb.module \fb_exit()

Implements hook_exit().

When completing a canvas page we need special processing for the session. See fb_session.inc.

Also invoke hook_fb(FB_OP_EXIT), so that other modules can handle special cases (in particular form support in fb_canvas.module.

TODO: remove this hook, for compatibility with Drupal's aggressive caching. Modules that currently look for FB_OP_EXIT will need to implement hook_exit on their own.

File

./fb.module, line 1332
This is the core required module of Drupal for Facebook.

Code

function fb_exit($destination = NULL) {
  global $_fb_app, $_fb;
  if ($_fb_app && $_fb) {

    // Invoke other modules.
    fb_invoke(FB_OP_EXIT, array(
      'fb_app' => $_fb_app,
      'fb' => $GLOBALS['_fb'],
    ), $destination);
  }
}