You are here

function fb_vars in Drupal for Facebook 7.3

Same name and namespace in other branches
  1. 6.3 fb.module \fb_vars()

Helper function to get the most commonly used values. In your custom module, call extract(fb_vars()); to set $fb_app, $fb, and $fbu.

8 calls to fb_vars()
fb_graph_delete_confirm_form in ./fb_graph.pages.inc
Form creator -- ask for confirmation of deletion
fb_graph_delete_confirm_form_submit in ./fb_graph.pages.inc
fb_graph_get_tags in ./fb_graph.module
Get the metatag values for the current page.
fb_graph_load in ./fb.module
Implementation of a %wildcard_load(). http://drupal.org/node/224170
fb_invite_access_cb in contrib/fb_invite.module

... See full list

File

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

Code

function fb_vars() {

  // Access callback are called before hook_init, so make sure FB api initialized.
  if ($GLOBALS['_fb_app'] && !$GLOBALS['_fb']) {
    $GLOBALS['_fb'] = fb_api_init($GLOBALS['_fb_app']);
  }
  return array(
    'fb' => $GLOBALS['_fb'],
    'fb_app' => $GLOBALS['_fb_app'],
    'fbu' => fb_facebook_user(),
  );
}