function fb_get_fbu in Drupal for Facebook 6.3
Same name and namespace in other branches
- 5.2 fb.module \fb_get_fbu()
- 5 fb.module \fb_get_fbu()
- 6.2 fb.module \fb_get_fbu()
- 7.3 fb.module \fb_get_fbu()
Given a local user id, find the facebook id.
Invokes hook_fb(FB_OP_GET_FBU) in order to ask other modules what the fbu is. Typically, fb_user.module will answer the question.
11 calls to fb_get_fbu()
- fb_app_user in ./
fb_app.module - Implementation of hook_user.
- fb_devel_info in ./
fb_devel.module - fb_devel_page in ./
fb_devel.module - Provides a page with useful debug info.
- fb_devel_user in ./
fb_devel.module - Implements hook_user().
- fb_get_object_fbu in ./
fb.module - Convenience function to learn the fbu associated with a user, node or comment. Used in theming (X)FBML tags.
File
- ./
fb.module, line 1000 - This is the core required module of Drupal for Facebook.
Code
function fb_get_fbu($uid, $fb_app = NULL) {
// Accept either a user object or uid passed in.
if (is_object($uid) && $uid->uid && isset($uid->fbu) && $uid->fbu) {
return $uid->fbu;
}
elseif (is_object($uid)) {
$uid = $uid->uid;
}
if ($uid) {
// User management is handled by another module. Use our hook to ask for mapping.
$fbu = fb_invoke(FB_OP_GET_FBU, array(
'uid' => $uid,
'fb' => $GLOBALS['_fb'],
));
}
else {
$fbu = NULL;
}
return $fbu;
}