If you use the Profile module on your site, it will make more sense to import Facebook user data to this module than to the fb_connect table. If you don't, your application would have to differentiate between Facebook users and non-Facebook users when displaying profile data.
I propose to implement a hook that can handle the Facebook user data in custom ways.
Add this on the line 295 of fbconnect_profile.module:
module_invoke_all("fbconnect_profile_insert", $uid, $fb_user_profile);
To store the user data in the profile module, you can then implement a hook in your application's module like this:
function business_witu_fb_fbconnect_profile_insert($uid, $profile)
{
$user = user_load(array("uid" => $uid));
user_save($user, array(
"profile_fname" => $profile["first_name"],
"profile_lname" => $profile["last_name"],
"profile_about_me" => $profile["about_me"],
"profile_country" => $profile["current_location"]
)
);
}
Please let me know if this misses something or if it could be added to the official code.
Comments
Comment #1
vectoroc commented