You are here

function _fb_js_settings in Drupal for Facebook 7.4

Build the settings expected by fb.js.

1 call to _fb_js_settings()
fb_init in ./fb.module

File

./fb.module, line 110

Code

function _fb_js_settings($fb_app) {
  $access_token = fb_user_token($fb_app);
  $settings = array(
    'namespace' => $fb_app['namespace'],
    'name' => $fb_app['name'],
    'client_id' => $fb_app['client_id'],
    'access_token' => $access_token,
  );

  // TODO: get extended perms.
  $settings['scope'] = array();
  $settings['client_auth_url'] = fb_client_auth_url($fb_app);

  // TODO: only if app supports this.
  return $settings;
}