function fbconnect_render_js in Facebook Connect 6.2
Same name and namespace in other branches
- 8.2 fbconnect.module \fbconnect_render_js()
- 6 fbconnect.module \fbconnect_render_js()
- 7.2 fbconnect.module \fbconnect_render_js()
This function manage all javascripts used by this module.
1 call to fbconnect_render_js()
- fbconnect_init in ./
fbconnect.module - Implements hook_init().
File
- ./
fbconnect.module, line 398 - Integration with Facebook Connect API.
Code
function fbconnect_render_js() {
global $base_url;
global $user;
$module_path = drupal_get_path('module', 'fbconnect');
if ($config = fbconnect_get_config()) {
unset($config['secret_api_key']);
$config['fbuid'] = fbconnect_get_fbuid();
$config['user'] = array(
'uid' => $user->uid,
'fbuid' => @$user->fbuid,
);
drupal_add_js(array(
'fbconnect' => $config,
), 'setting');
drupal_add_js($module_path . '/fbconnect.js');
drupal_add_css($module_path . '/fbconnect.css');
}
}