Closed (fixed)
Project:
Facebook OAuth (FBOAuth)
Version:
7.x-1.4
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Reporter:
Created:
24 Mar 2012 at 15:54 UTC
Updated:
10 Mar 2013 at 19:13 UTC
Say a user updates their email on their Facebook.com, will that new email address be synced to my drupal site user's profile? What about the rest of the profile fields? Not that I expect a user's birthday or gender to change all that often haha. More concerned about their email address, location, etc.
Sorry if I missed this in the documentation, my understanding is that it currently only passes the info you want to collect the very first time the user connects.
Comments
Comment #1
quicksketchThat is correct. Right now we don't even provide a hook to fire every time a user logs in, but I'd be happy to add such a hook if you're interested.
"Syncing" information is extremely messy though, as users could easily change their Drupal e-mail to something else than their Facebook e-mail, and automatically replacing their manual information with their Facebook e-mail on every login could be quite annoying. You'd need to somehow keep track of when users updated information both in Drupal and Facebook, and use the latest one only if they hadn't modified their local one. But since Facebook doesn't provide that information, I'm not sure how you could handle it. The whole situation would be a lot of trouble.
Comment #2
grasmash commentedI would find a login hook very useful. I'm currently using hook_fboauth_actions_alter() to override the 'connect' callback in order to fire additional functions.
Comment #3
grasmash commented@quicksketch
I'd be willing to help implement this hook with a little bit of advice. Would you suggest simply adding module_invoke_all() to a number of the control structures in fboauth_action_connect() ? Haven't done much work creating my own hooks, so I thought I'd check before rolling a patch.
E.g.,
Comment #4
quicksketchWe already have a hook inside of fboauth_create_user() (
hook_fboauth_user_presave()), I think we just need to add a module_invoke_all() inside of fboauth_login_user(), perhaps passing $fbuser into fboauth_login_user() so that it can pass it forward to the hook. The only downside of this approach is that it doesn't fire a hook when binding a Facebook user with an existing Drupal account. I'm not sure how important that is at this point.Comment #5
gkdreamz commentedis there any way to get friends education history and work history.i tried to send permission friend_education_histroy and friend_work-history on fboauth.fboauth.inc file.but i got an error.how will i pass the permission to facebook and get my friend info.Any help would be greatly appreciated, Thanks.
Comment #6
gkdreamz commentedComment #7
quicksketchThis question is unrelated to the topic of this issue (which has been answered already). I don't provide support on custom coding, but you can read the official documentation of Facebook permissions here: https://developers.facebook.com/docs/reference/login/
In short. There isn't a way to get access to friend's personal information, since that would almost certainly violate privacy. The user has to grant access to their own information (though "basic information" is always available about a user's friends).
Comment #8
Brian E. Conklin commentedI've been searching and trying different things for a couple of days now and still haven't found a resolution. I need to be able to update drupal's info on a user from Facebook. This is the case in the change of a piece of FB data but also when I add a field in Drupal to fill from FB. If they've already connected, it must be manually entered instead of pulling it from FB.
I tried disconnecting a user from FB and then reconnecting but I don't get any of their FB data on the reconnection.
How can I implement a "refresh" of FB data either by button click or login or can we have Drupal repull all FB data on a disconnect/reconnect evolution?
Comment #9
jhm commentedCheck out http://drupal.org/sandbox/madmatter23/1493630