Hi,
is it possible that when automatic registration is enabled, that module asks user only local account name and email, so account gets created on local site with these information ?
Currently when automatic check box is checked, it doesn't work exactly like this and is a bit buggy.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Robardi56’s picture

Status: Needs work » Active
vectoroc’s picture

Did you tried to do it with last dev?

vectoroc’s picture

Version: » 6.x-2.x-dev
Status: Active » Needs review

Automatic registration is fixed.
http://github.com/vectoroc/fbconnect/tree/6.x-2.x

Robardi56’s picture

Status: Needs review » Needs work

Tks, as said in the mail, with this version I can't save API ID in module settings, thus I can't get it to work, so I can't test.
Please fix the API ID saving, so I can test the fast registration process.

Robardi56’s picture

Hi,
ok thanks for the fix, I was able to test fast registration process. I notice great progress, however some little issues remains:

- When "Link account during registration process" is UNCHECKED, and when user login for the first time, it fails to ask email permission, thus registration can't complete. Facebook does ask for authorization to install app, but doesn't ask for the email.
Normally, with new facebook methods, it is possible to ask both authorization from same popup screen.

I remark that it DOES ask for email authorization, but only when "link account during registration process" is CHECKED (after users choose to create account).

So please, fix this, so when "Link account during registration process" is UNCHECKED, it asks for email also so it is possible to complete the process.

Also, I didn't noticed the redirect url field I asked, or maybe it's the field "Destination, after user's valid or skip invite friend form: " ?

Keep up the good work.

Brakkar

vectoroc’s picture

Status: Needs work » Postponed (maintainer needs more info)

sorry. wrong page

Robardi56’s picture

Status: Postponed (maintainer needs more info) » Needs work
vectoroc’s picture

Facebook does ask for authorization to install app, but doesn't ask for the email.
Normally, with new facebook methods, it is possible to ask both authorization from same popup screen.

yes, it's possible. But not all users will use it.

Robardi56’s picture

Yes, but for fast registration, it is anyway required in all cases. Anyone using fast registration requires email authorization.
Since fast registration pulls email data from facebook, it currently can't when "Link account during registration process" is UNCHECKED.

It sends back a message account couldn't be created, thus the need of the fix. Please fix this.

vectoroc’s picture

Status: Needs work » Needs review

I got your point now. Try http://github.com/vectoroc/fbconnect/tree/6.x-2.x
I don't like, that now all users must grant email permission. Don't know yet how to solve another way

Robardi56’s picture

Status: Needs review » Needs work

Thanks a ton.
It works perfectly, now fast registration is really fast !!!!

On a single click + authorization, accounts get created locally. This is GREAT.
I don't see problem with email authorization: it is not asked when fast registration is not enabled: admins that enable fast registration, obviously want their users to register instantly, thus it is necessary to ask email authorization. It is not a problem at all.

Robardi56’s picture

Title: Fast registration mode improvement: single click account creation and login » automatic registration improvement: single click login and account creation

This is a message for the community, you can download latest work from http://github.com/vectoroc/fbconnect/tree/6.x-2.x and try what we've worked on:

- From fbconnect admin Enable "fast registration mode" and uncheck linking account during registration process.

Now, when you log with facebook for first time on site with this module, facebook will ask authorization to install app and transmit your email on single screen, and within a single click, will create account on local drupal site, and have you logged on the site.
Email used is facebook proxy email.

It's there finally, we have a drupal single click account creation and login from facebook info !!!

Robardi56’s picture

Title: automatic registration improvement » Fast registration mode improvement: single click account creation and login
Status: Needs work » Needs review
BenK’s picture

Title: automatic registration improvement: single click login and account creation » Fast registration mode improvement: single click account creation and login

Subscribing...

dreadfulcode’s picture

It's a good start.

But rather than utilizing the FB proxy, I would prefer to have access to the user's email address that has already been authenticated by facebook.

I would throw down a $100 bounty for an easy solution to configure FB permissions, or a way to pull FB user information into CCK fields. ie. hometown, email, age, in a submodule, perhaps, ideally presented as a checklist to the drupal developer.

Just an idea.

g.k’s picture

+1 for extended attributes and mapping to profile/cck fields after authorizing FB permissions. I will add $50 to the bounty.

dreadfulcode’s picture

Thanks gkap!

Hopefully this extra feature request will catch the attention of the module's maintainer.

Let's make it happen!

j0k3z’s picture

subscribing

ulechka’s picture

I've tried http://github.com/vectoroc/fbconnect/tree/6.x-2.x right now.
I've uninstalled old version of fbconnect, and remove module folder. after that I've add new module folder named fbconnect and paste to this folder all files of new version. I enabled module on the admin/modules page and gone to fbconnect settings page and add all info. After a press "save settings" button site gone down with white screen.
I've gone to mysql db and paste "UPDATE `system` SET status=0 WHERE filename='sites/all/modules/custom/fbconnect/fbconnect.module';"
Site was up again...
And I tried to enable module again in admin page, and site gone down again with white screen...
Hm...
Any help?

vectoroc’s picture

g.k’s picture

I looked into Rules and its triggers, but I couldn't find an action that will map FB attributes to user profile (or content profile) for e.g. I have the following FBML tag, and able to pull the user e-mail address during FBConnect but not sure how to map it to Drupal user's e-mail address.


<fb:login-button perms="email" size="small"  background="none" onlogin="facebook_onlogin_ready();">Login</fb:login-button>

locomo’s picture

subscribe

vectoroc’s picture

@gkap : post please into correct thread. (#886016: Rules module support)
I did'nt get what you want to do

kanyan.ror@gmail.com’s picture

Version: 6.x-2.x-dev » 7.x-2.x-dev
Ross-Hunter’s picture

Is one click account registration supposed to be working in the latest 7.x release? I am still having to click once to connect to FB, and once again to create a Drupal account. I have tried creating a rule that redirects to fbconnect/register/create - but no go there either.

ganagus’s picture

@Ross-Hunter, I could manage to do one click registration from javascript. At around line 34 of fbconnect.js, I changed the auth.authResponseChange event handler as follow:

Drupal.fbconnect.reload_ifUserConnected = function(state) {
  var user = Drupal.settings.fbconnect.user;
  //console.log(state.status);

  if (!state.authResponse || user.uid) return;

  if (state.authResponse.userID != user.fbuid) {
    //console.log(state.status);
    if (state.status == 'connected') {
      //console.log('auto-logon');
      window.location.href = Drupal.settings.basePath + 'fbconnect/register/create';
    } else {
      window.location.reload();
    }
  }
};

However, although I could get it working, I haven't tested it thoroughly in all scenarios.

delphian’s picture

Code posted in #26 works for me. I created a patch for it.

focal55’s picture

For Drupal 7's version, I am finding the window.reload function is being called from near line 581 of fbconnect.module. I followed #26 adjustment and modified it like this:

// ... fbconnect.modulde ...

// whenever the user logs in, we tell our login service
FB.Event.subscribe(\'auth.login\', function(response) {
  if (response.status == "connected"){
    window.location.href = Drupal.settings.basePath + "fbconnect/register/create";
  }
  //window.location.reload();
});

Another hack I had to do in order to get Fast Registration working with Drupal 7 is comment out a few lines in fbconnect.pages.inc that attempt to unset some form fields including Taxonomy. Here are the lines I commented out:

<?php 
//... fbconnect.pages.inc ... 


  // Fast registration mode, we by pass std drupal reg form.
  if ($conf['fast_reg_mode']) {
    $newname = $conf['fast_reg_autoname']? _fbconnect_get_username($data['name']) : $data['name'];
    //drupal_set_message('new name : ' . $newname);
    $form_state['values']['name'] = $newname;
    $form_state['values']['mail'] = $data['email'];
    $form_state['values']['pass'] = user_password();
    $form_state['values']['status'] = 1;
    $form_state['values']['fb_visible'] = 1;
    $form_state['values']['fb_avatar'] = 1;

    //to make validation work have to unset some form fields and settings Taxonomy fields cause errors
    //TODO:: check this code sure it will need to check for required profile fields and fill them with data
    /*
    foreach ($form as $key => $val) {
      //unset all cusom fields
      if (strstr($key, 'field_')) {
        //unset this custom field
        unset($form[$key]);
      }
    }
    $form_state['complete form'] = $form;
    //taxonomy linked fields causes issues with this validate form function
    drupal_validate_form('user_register', $form, $form_state);
    */

    $success = !form_get_errors();
    if (!$success) {
      $dest = array('query' => 'destination=fbconnect/link');
      drupal_set_message(t('Facebook connect registration failed for the reasons listed. You may register now, or if you already have an account you can <a href="@login">log in</a> now and link your account', array('@login' => url('user/login', $dest))), 'warning');
      // Append form validation errors below the above warning.
      $messages = drupal_get_messages('error');
      foreach ($messages['error'] as $message) {
        drupal_set_message($message, 'error');
      }

      drupal_goto('user/register', $dest['query']);
    }

    fbconnect_register_form_submit($form, $form_state);
  }
?>

After these two hacks, the fbconnect module is working to achieve FB Connect with Fast Registration.

jasonglisson’s picture

# 28 did not work for me.

I've done this hack 3 times today and it has not worked each time. Still getting a redirect loop.

Am I missing something?

tamerzg’s picture

#28 works for me. Can we get this commited?

jcisio’s picture

How does it get committed when 1/ there is no patch 2/ and 1/2 users reported that (in #29) it did not work.

maris.abols’s picture

#28 don't work for me, be #26 works for me as I expected. So I created small patch of #26 code...

  • vectoroc committed 8952f82 on
    #788118, #848354 : updated outdated code, fixed automatic registration...