You are here

function fb_tab_view in Drupal for Facebook 6.3

Same name and namespace in other branches
  1. 7.3 fb_tab.module \fb_tab_view()

Another module provides the contents of the tab depending on the context that we give it (who is calling it, etc.)

1 string reference to 'fb_tab_view'
fb_tab_menu in ./fb_tab.module

File

./fb_tab.module, line 257
This module provides support for "Profile Tabs" that can be added to facebook pages (no longer allowed for user profiles).

Code

function fb_tab_view() {
  $fb_app = $GLOBALS['_fb_app'];
  $fb = $GLOBALS['_fb'];
  $profile_id = fb_settings(FB_SETTINGS_CB_PAGE);
  $config = fb_tab_get_page_config($fb_app, $profile_id);
  $sr = $fb
    ->getSignedRequest();
  $data = array(
    'fb_app' => $fb_app,
    'fb' => $fb,
    'profile_id' => $profile_id,
    'config' => isset($config['data']) ? $config['data'] : NULL,
    'page' => $sr['page'],
  );
  $content = fb_invoke(FB_TAB_OP_VIEW, $data, array(), FB_TAB_HOOK);
  return drupal_render($content);
}