function fbconnect_facebook_client in Facebook Connect 6.2
Get the facebook client object for easy access.
Return value
Facebook Facebook Api object
12 calls to fbconnect_facebook_client()
- FbconnectTestCase::setUp in tests/
fbconnect.test - Implementation of setUp().
- fbconnect_fbapp_settings in ./
fbconnect.admin.inc - @todo.
- fbconnect_fbapp_settings_submit in ./
fbconnect.admin.inc - @todo.
- fbconnect_footer in ./
fbconnect.module - Implements hook_footer().
- fbconnect_form_alter in ./
fbconnect.module - Impletementation of hook_form_alter().
File
- ./
fbconnect.module, line 308 - Integration with Facebook Connect API.
Code
function fbconnect_facebook_client() {
static $fb = NULL;
if (is_null($fb)) {
$conf = fbconnect_get_config();
if ($conf && _fbconnect_facebook_client_load_include()) {
$init_params = array(
'appId' => $conf['app_id'],
'secret' => $conf['secret_api_key'],
'cookie' => TRUE,
);
$fb = new Facebook($init_params);
// Hack for #902542.
Facebook::$CURL_OPTS[CURLOPT_SSL_VERIFYPEER] = FALSE;
Facebook::$CURL_OPTS[CURLOPT_SSL_VERIFYHOST] = 2;
}
}
return $fb;
}