I wanted to use this module, it seems great and has a lot of functionality - but it's simply not an option without the ability to properly integrate accounts. You need to be able to log in with either your facebook or drupal account, and then be able to integrate those accounts. The user needs to be prompted for this, just like in facebook connect. Please add this, it should be one of the basic features of a module of this kind.

Comments

Dave Cohen’s picture

Status: Active » Fixed

Read the README.txt and see the settings provided by fb_user.module.

armanschwarz’s picture

I have read the readme from start to finish, twice, and it has nothing to do with this. Here is what SHOULD happen:

I log in with my facebook account, and am then prompted whether I want to create a new username or link to an existing account. If I log in with my drupal account, I should see an option in the settings, where I am able to link my account with a facebook account. If I click this button and I am logged into facebook, it should automatically link the two. If I am not logged in, it should prompt me for my facebook username/password and then link the accounts.

armanschwarz’s picture

If this feature were added, and were made transparently available to the person installing the module, I'm sure your userbase would double.

g.k’s picture

+1 for account linking option similar to FBConnect module.

Dave Cohen’s picture

Version: 6.x-2.0-rc2 » 6.x-3.x-dev
Status: Fixed » Active

I log in with my facebook account, and am then prompted whether I want to create a new username or link to an existing account. If I log in with my drupal account, I should see an option in the settings, where I am able to link my account with a facebook account. If I click this button and I am logged into facebook, it should automatically link the two.

If you've connected via facebook, then you have the option of creating a new username, at ?q=user/register. Or, the option of linking to an existing account, at ?q=user/login. In other words, Drupal already has forms for these two things. There's no reason to create new ones.

If I am not logged in, it should prompt me for my facebook username/password and then link the accounts.

You can accomplish this with fb:login-button, which is provided by the facebook connect block, for example.

I should see an option in the settings, where I am able to link my account with a facebook account. If I click this button and I am logged into facebook, it should automatically link the two

That sounds to me like unnecessary extra clicking. A small custom module could be written to do that, but I'm not convinced modules/fb should support it.

ahansen1’s picture

It would be nice if someone would build a module on top of DFF that provides common features such as these. It would be a shame for each one of us to build this sort of thing on our own.

g.k’s picture

I agree, module functionality is one thing and usability is another. I evaluated DFF but had to switch back to FBConnect, as there is no interface to link account, map profile fields etc.

Dave Cohen’s picture

I guess it never occured to me that someone would want to (a) login to drupal and (b) connect to facebook and (c) not want the accounts connected.

The bulk of code for such a feature would be the UI. The linking of the accounts would be something like...

if ($fb_app = $GLOBALS['_fb_app']) { // Facebook enabled.
  if ($fbu = fb_facebook_user()) {  // Authorized user.
    if ($uid = $GLOBALS['user']->uid) {  // Registered user.
      list($module, $authname) = _fb_user_get_authmap($fb_app, $fbu);
      user_set_authmaps($account, array($module => $authname));
    }
  }
}

Users with "delete own fb_user authmap" permission can delete the link under user => edit. But no doubt it could be made easier.

As for the profile fields... historically, it was a violation of terms of service to save the data you learned from facebook. Recently they've let up on that policy. I'd be open to a contrib module which attempts to do that sort of thing.

perarnet’s picture

I have to agree with the above. I've seen other websites offering the option to create a new account just using the facebook id. What I'd like is the option to extract email, username etc from facebook and prepopulate the user register form. For my needs, facebook integration is provided to make it very easy to add an account, aswell as login to an existing account.

Dave Cohen’s picture

perarnet, it can do exactly what you describe. Enable fb_permission.module and tell it to ask for the email extended permission. Cofigure the fb_user.module not to create new accounts automatically, and to alter the user registration form.

There's some kind of miscommunication on this thread. I have the feeling you guys are asking for something without even checking what the modules can already do.

gateway69’s picture

How can the reverse be done? Meaning if im on Facebook and i go to my app, authorize it, I want to send the data facebook returns from the fbuid on facebook and add it to drupal and if the fbuid isnt in the system, have it auto create an account with out the user needing to.

?

Dave Cohen’s picture

The fb_user.module is the easiest way. Just configure it to create a new account with the user authorizes the app.

If you don't like the way fb_user.module does it, you could implement your own module. I would use fb_user.module as an example.

juanlacueva’s picture

I know a lot of people expecting an easy way to link a drupal account with a FB account out of the box, but I guess everyone installs the module and don't get how it's done, including me in part.

I'm still not sure if I got it right:

If the user connected with Facebook he can either:
?q=user/register -> to create a new user related to that FB:account (if not automatically made)
?q=user/login -> to fill in the missing drupal account data ?

If the user is logged in to drupal and want to associate his FB account to it,
the way to do it is him to click the Connect with Facebook button?
- That doesn't seem intuitive for the developer because once the user is logged in, the Connect with FB button dissapears unless you manually put a block with it.
- That doesn't seem intuitive for the end user: they already logged in, why "do it again"?
A more drupal-like way I think would be to have a Tab or Section in the Profile (/user) in which he can link/unlink his (the current) drupal account to his FB account... and even more ideas: set preferences like to write events (comment, node creation, etc) to his wall on/off, etc.

Maybe some of what I mentioned is already done (I apologize if it is) but I didn't see it. I'm not a Drupal expert but not a newbie either. I usually get how modules work/interact with Drupal right away but I'm having some difficulty with this one.
From what I can see, this module provides a base for developing FB stuff into your drupal, but many expect more "out of the box" functionality and there isn't a list of modules that work with or extend FFD, so many drupal user that doesn't know how to develop their own modules don't know what to do after installing DFF.

For example, it would be nice to have a checkbox next to a comment field so the user can select if he want to publish that comment to his wall... but to do so, I'd have to program it myself (wouldn't I?). Maybe this isn't the more requested feature, but it's an example. It would be nice if there were modules extending DFF (like modules that extends CCK) and a list of them.

I think Drupal for Facebook it's such a great thing that it will start to create it's own orbit of modules and stuff like it happens to Organic Groups, Views, CCK, Ubercart, etc.

BTW, I think it should be called Facebook for Drupal: your adding FB into Drupal, not the other way around (except with the canvas thing) :P
or... DFBF: Drupal FB Framework :P

Even if it looks like I'm complaining, I still think this is a great module and I thank you for it. I just want it to be "more awesome" ;)

Dave Cohen’s picture

Status: Active » Fixed

Just checked in a feature to support this.

First configure an app, under use settings, do not create accounts automatically, and do not map accounts automatically.

Then, log into Drupal. Go to my account >> edit >> facebook. On this page, you'll have an option to connect to facebook, or if already connected you'll have a checkbox to connect the two accounts.

I'm not saying the UI is perfect, and I'm open to patches that make it easier.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.