Another suggestion: You could add an extra column to the user db table do store a copy of the mapped fbuid. This way you could save the extra query from get_fb_uid() in showthread, newthread, and newreply and have quick everywhere-present access to figure out whether the logged-in user was created via facebook.
Alternatively, without adding this extra column, you could hook fetch_userinfo_query and add the info from your fbuser table like this:
PHP Code:
$hook_fields = array("fbuser.fbuid");
$hook_joins = array("LEFT JOIN " . TABLE_PREFIX . "fbuser AS fbuser ON (fbuser.userid = user.userid)",);
$hook_query_fields .= ', ' . implode(', ', $hook_fields);
$hook_query_joins .= "\r\n" . implode("\r\n", $hook_joins);
to add the fbuid (if present) to the global userinfo array (untested, but in principle it should work).