function fb_settings_get_facebook_cookie in Drupal for Facebook 7.3
Same name and namespace in other branches
- 6.3 fb_settings.inc \fb_settings_get_facebook_cookie()
The current format of the cookie is a signed request.
Facebook doesn't document the cookie name or format, so basically we just have to hope this works.
1 call to fb_settings_get_facebook_cookie()
- fb_settings.inc in ./
fb_settings.inc - This file is to be included from your sites/.../settings.php file.
File
- ./
fb_settings.inc, line 130 - This file is to be included from your sites/.../settings.php file.
Code
function fb_settings_get_facebook_cookie($app_id, $application_secret = NULL) {
if (!isset($_COOKIE['fbsr_' . $app_id])) {
return;
}
$sr = _fb_settings_parse_signed_request($_COOKIE['fbsr_' . $app_id]);
return $sr;
}