You are here

function fb_canvas_goto in Drupal for Facebook 5.2

Same name and namespace in other branches
  1. 6.3 fb_canvas.module \fb_canvas_goto()
  2. 6.2 fb_canvas.module \fb_canvas_goto()
  3. 7.3 fb_canvas.module \fb_canvas_goto()

Uses $fb->redirect on canvas pages, otherwise drupal_goto.

File

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

Code

function fb_canvas_goto($path) {
  global $fb, $fb_app;
  if ($fb && (fb_canvas_is_fbml() || fb_canvas_is_iframe())) {
    $url = fb_canvas_fix_url(url($path, NULL, NULL, TRUE), $fb_app);
    $fb
      ->redirect($url);
  }
  else {
    drupal_goto($path);
  }
  exit;
}