function fb_infinite_fb in Drupal for Facebook 5.2
Same name and namespace in other branches
- 5 fb_infinite.module \fb_infinite_fb()
hook_fb.
File
- ./
fb_infinite.module, line 12 - This module manages an infinite session for each Facebook App. http://wiki.developers.facebook.com/index.php/Infinite_session_keys
Code
function fb_infinite_fb($op, $data, &$return) {
$fb = $data['fb'];
$fb_app = $data['fb_app'];
if ($op == FB_OP_GET_INFINITE_SESSION) {
// The fb module is asking for infinite session login information.
// This module knows it, so we provide it.
$fb_app_data = fb_app_get_data($fb_app);
$fb_infinite_data = $fb_app_data['fb_infinite'];
if ($fb_infinite_data['fbu'] && $fb_infinite_data['key']) {
// Return array with FB id and apikey.
$return = array(
$fb_infinite_data['fbu'],
$fb_infinite_data['key'],
);
}
}
}