function fb_get_fbu in Drupal for Facebook 5.2
Same name and namespace in other branches
- 5 fb.module \fb_get_fbu()
- 6.3 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.
8 calls to fb_get_fbu()
- fb_actions_profile_fbml in ./
fb_actions.module - fb_app_user in ./
fb_app.module - Implementation of hook_user.
- fb_devel_canvas_info in ./
fb_devel.module - fb_devel_page in ./
fb_devel.module - Provides a page with useful debug info.
- fb_feed_action_publish in ./
fb_feed.module
File
- ./
fb.module, line 339
Code
function fb_get_fbu($uid, $fb_app = NULL) {
// default to current app (only set if we're in a FB callback)
if (!$fb_app) {
$fb_app = $GLOBALS['fb_app'];
}
// Accept either a user object or uid passed in.
if (is_object($uid) && $uid->fbu) {
return $uid->fbu;
}
else {
if (is_object($uid)) {
$uid = $uid->uid;
}
}
// User management is handled by another module. Use our hook to ask for mapping.
$fbu = fb_invoke(FB_OP_GET_FBU, array(
'fb_app' => $fb_app,
'uid' => $uid,
'fb' => $GLOBALS['fb'],
));
return $fbu;
}