You are here

function fb_canvas_footer in Drupal for Facebook 5.2

Same name and namespace in other branches
  1. 6.2 fb_canvas.module \fb_canvas_footer()

File

./fb_canvas.module, line 286
This module provides some app-specific navigation to facebook apps.

Code

function fb_canvas_footer($is_front) {
  if (fb_canvas_is_fbml()) {

    // Add FBJS only to FBML pages.
    global $fb, $fb_app;
    $data = array(
      'fb' => $fb,
      'fb_app' => $fb_app,
    );
    $extra = fb_invoke(FB_OP_CANVAS_FBJS_INIT, $data, array());

    //dpm($extra, "FB_OP_CANVAS_FBJS_INIT returning"); // XXX
    if (count($extra)) {
      $extra_js = implode("\n", $extra);
      fb_add_js('', '');

      // prime javascript
      drupal_add_js($extra_js, 'inline', 'fbml');
    }
  }
}