× Joomla Facebook Connect support forum

Topic-icon JFBConnect with Community Builder 1.3.1

Active Subscriptions:

None
15 years 4 months ago #7209 by guero
Hi again,

Re the gender topic: I don't think the cause is what you suspected. I have another drop down for countries in CB Field manager which is configured exactly as the Gender (except it has more entries and they are country names) and JFBConnect works like a charm with it. The only difference I can tell is that I created this field in CB Field manager BEFORE I installed JFBConnect suit.

In addition to gender, I also created in CB Field manager (again after I installed JFBConnect suit) a field of type URL (let's call it FacebookURL). My intention is to import the user's FB URL into this field from the field 'User - profile link' which is one of the options in the JFBConnect drop down. However, also my FacebookURL field, just like Gender, does not show in JFBConnect -> Profiles -> CommunityBuilder tab for mapping.

Any ideas?

Thank you,
Oliver

PS Re Reconnect fun: Yes, that's exactly what I meant :)
The topic has been locked.
Support Specialist
15 years 4 months ago #7220 by alzander
Dotcom,
Sorry I missed your post earlier. Full Facebook User shouldn't act any differently than Facebook User Only. The best guess I have for this is that the JFBConnect User plugin is not properly ordered after the Joomla User plugin. Please check the JFBConnect overview page and under "Required Extensions", make sure that there are no errors there. If that doesn't help, I'd ask you to send us a super admin account for your site so we can investigate further.

Both of you:
If you'd like the radio button fields and URLs to show up in the field mapping, try the following PHP modification. We'll be adding URL fields to the next release, but are still deciding on Radio buttons. They are tough because you need to make sure the options are the same as what gets imported from Facebook. Feel free to test.
To show those fileds, modify the /plugins/jfbcprofiles/communitybuilder.php file. At line 189, you'll see a long line that starts with $query = "SELECT * ... At the end of this line, add the following (the date part is already there to give you an idea:
OR type="date" OR type="radio" OR type="webaddress"';

Test it out and let us know how it goes! Good luck!
The topic has been locked.
Active Subscriptions:

None
15 years 4 months ago #7233 by dotcom22

alzander wrote: Dotcom,
Sorry I missed your post earlier. Full Facebook User shouldn't act any differently than Facebook User Only. The best guess I have for this is that the JFBConnect User plugin is not properly ordered after the Joomla User plugin. Please check the JFBConnect overview page and under "Required Extensions", make sure that there are no errors there. If that doesn't help, I'd ask you to send us a super admin account for your site so we can investigate further.

Both of you:
If you'd like the radio button fields and URLs to show up in the field mapping, try the following PHP modification. We'll be adding URL fields to the next release, but are still deciding on Radio buttons. They are tough because you need to make sure the options are the same as what gets imported from Facebook. Feel free to test.
To show those fileds, modify the /plugins/jfbcprofiles/communitybuilder.php file. At line 189, you'll see a long line that starts with $query = "SELECT * ... At the end of this line, add the following (the date part is already there to give you an idea:
OR type="date" OR type="radio" OR type="webaddress"';

Test it out and let us know how it goes! Good luck!


Hello Alzander

1) About radio I try to make the modification you suggest...but the data was not imported... Anyway I reflecting about that and in my case is maybe not a big deal. In fact I think is better to avoid to ask to user to import many thing from their FB profile...Like that I'm sure they will accept to register to my site. Personally the main thing I'm interested to import is their public data (avatar and name) and if possible they email. The rest of data can be filled later in their own CB profile...

2) About FB proxy email I understand now we don't have any possibility to be sure users will allow us to import their real email. This is very annoying because I would like be able to contact them. Have you a trick permitting to get their real email?

3) About connexion I get now some problem even using "Facebook User Only" method and I don't know why. The users is connected but his CB profile is not approved. No avatar is displayed (I get the default unapproved CB avatar) and a message telling I must confirm my subscription... Anyway what is strange is their name are well imported. I take a look like you suggest to plugin order and:

- The plugin User - Joomla! is published BEFORE the plugin User - JFBConnect Facebook.

- I take a look also to plugin Authentication - Joomla who is published BEFORE the plugin Authentication - JFBConnect Facebook. I try also to invert the position but no change.

4) I take a look into JFBConnect overview but don't see any errors. The only thing is missing is the JFBConnect login module because is installed but not published. In fact I don't plan to use it because I want allow user to use CB login module only. I need to publish this module or not ? It make no sens to publish 2 login/logout module...

Except if you have some other suggestions is maybe better if you can take a look inside my admin. In that case how I can do for transmit to you my credential ?

thank
The topic has been locked.
Active Subscriptions:

None
15 years 4 months ago #7234 by guero
Hello Alzander,

Thanks again. I think the (or at least my) original problem got lost in the thread. The problem is not that the data does not pull from Facebook and would not store into the field in CB.

The problem is that the field I created (name: 'cb_gender' of type 'select') does not even show in the list of fields available for mapping in the JFBConnect admin backend under JFBConnect->Configuration->communitybuilder tab. Therefore, I cannot map the FB field 'Basic Info - Sex (Male / Female)' to it.

Another field I defined of name: 'cb_country' of same type 'select' with the exact same settings (in CB Field Manager) for type, tab, required?, profile?, registration?, searchable?, and published? as the 'cb_gender' works just fine. This one does show up the JFBConnect backend for mapping to a Facebook field of my liking.

That's the problem. Do you know what I mean? And the only difference afaik is that I created cb_country first, then installed JFBConnect, and then created cb_gender. And then I upgraded to the last version of JFBConnect which came out in the meanwhile.

Is there a way to force JFBConnect to 're-initialize' itself and scan for all CB fields it should show for mapping in its backend? (forget about radio buttons and URL for a second).

Thank you,
Oliver
The topic has been locked.
Support Specialist
15 years 4 months ago #7300 by alzander
Guero,
Your idea wasn't lost, I just messed up with the code I posted above. To begin, I'll explain what JFBConnect is doing a little more behind the scenes. When you go to the Profiles page to map fields, JFBConnect loads the available fields from CB at that time. We don't cache or need to be refreshed with new fields. We know what fields are 'available' by using that MySQL query that I mentioned above.

My guess for why cb_country shows up is that not only is it a select box (which we don't normally show), but it may be tagged (inside CB) as a predefined field. Either way, please try the following to the same line I mention above:
OR type="select"

This should show any select boxes in the mapping area, and hopefully let you map the fields. The ordering of creation of fields has no bearing on what can be imported too.

If that doesn't work, let us know. We'll test the hell out of it on our end and come up with exactly what you need because in that case, we'd obviously be missing something :)

Hope this all helps, and best of luck!
The topic has been locked.
Active Subscriptions:

None
15 years 3 months ago #7514 by guero
Thank you. We will try that out. I will let you know if it did the trick.

I was wondering about one more thing (neverending stream of questions) - I am not sure if I read about it somewhere already or not.

Is it possible to do so that users can sign-in/register with JFBConnect as Full Joomla users, and to have an admin or moderator approve their joining before their registration is fully complete? I have set in CB Configuration -> Registration -> Require Admin Approval to Yes and I was hoping the user would then get the email telling him that he will be able to log-in as soon as the admin approved it. However, when using JFBConnect, the user already does get into the site. And when trying to get to his/her own profile is presented with a "This user has not yet been approved by a moderator!" error message.

in the JFBConnect backend I have set Skip CB Activation (Community Builder Only) to "No" and activation is enabled in Community Builder, the user will need to activate their account. The user will first need to log out of the site and then activate. Otherwise, the activation will fail. But this does not have the desired effect as it yields above error message.

Thank you,
Oliver
The topic has been locked.
Support Specialist
15 years 3 months ago #7519 by alzander
Guero,
Let us know how the updated mapping setting works for you.. hopefully, that will close that issue, but if not, let us know.

As for the activation, we've just started having a few users really trying out CB with the Skip Activation set to 'no', and we're realizing there's some issues with how we've implemented that. Right now, after a successful registration, we automatically log the user in. Regardless of whether they're activated in CB, the Joomla user manager is letting them log in, and so we'll need to add some checks to that in the future to prevent that. Additionally, we've found that the activation email sent from CB doesn't always have the token in it.

These issues are all being investigated, and we're planning for the 3.2 release to fix these problems, and add more CB options. For now though, we'd have to recommend enabling the CB Skip Activation setting.

Sorry for the troubles. Hope this helps explain the situation a little more clearly.
The topic has been locked.
Active Subscriptions:

None
15 years 3 months ago #7523 by guero
Thank you Alzander. Your support is really great! We are currently doing some heavy lifting on our end to upgrade various parts of our service. I will push for making sure the changes you recommended earlier get scheduled soon and then I will let you know.

Re 3.2: do you have a rough time-line in mind for when this might come out? This particular feature would come in really handy for us right now actually. We are running in invite only mode, and allowing people to register and for us then to be able to approve them at a later point in time would really help us a lot.

Thanks,
Oliver

PS I tried to once send you a direct message, not sure if you ever received it. I was asking if you had thought about making a similar piece of SW for LinkedIn as well? There is 80-90M members on LinkedIn and believe it or not, there does not seem to be a single component for Joomla which would allow people to sign into a Joomla site with their LinkedIn credentials. What a blue ocean market. If you ever thought about it, I'd be curious to know.
The topic has been locked.
Support Specialist
15 years 3 months ago #7531 by alzander
Oliver,
Thanks for the praise of our support. If you'd like to let others know about our extension or support, we'd love it if you would consider voting and/or reviewing us on the JED:
extensions.joomla.org/extensions/social-...ook-integration/7215

As for 3.2, we're shooting for March. However, I just tested some minor code changes below and they'd do exactly what you're looking for.. enable moderation of users and prevent them from logging in if you haven't approved them (or they haven't confirmed their email address). Please note, this is completely different than what we're planning in 3.2, but it should be forward compatible, and get you over your current hurdle. Also, it should be pretty easy to implement :)
In the /components/com_jfbconnect/controllers/loginregister.php file, at line 89, add the logout command below:
# log our new user in
$app->login(array('username'=>$username, 'password'=>$password));
$app->logout(); // <--- Add this
The login is still required, as that's what creates the CB user and updates their profile. The logout simply undoes the automatic login.

Then, in the /plugins/authentication/jfbconnectauth.php file, add the following at line 59 (I've left a few lines above so you know exactly where to put this)
if ($jUserId)
{
   $dbo = JFactory::getDBO();
   $query = "SELECT user_id, confirmed, approved FROM #__comprofiler " .
      "WHERE user_id = " . $jUserId;
   $dbo->setQuery($query);
   $status = $dbo->loadObject();
   if (!$status->confirmed || !$status->approved)
   {
      $response->status	= JAUTHENTICATE_STATUS_FAILURE;
      $app =& Jfactory::getApplication();
      $app->enqueueMessage('Not approved', 'Error');
      return false;
   }
   ....

This will check the status of the user in CB and return the "Not approved" message is they aren't approved. Feel free to change that message.

Hope this isn't too complicated, and sorry to make you going around and changing our code. Good luck, and let us know if this works, doesn't, or if you have any other questions!
The topic has been locked.
Support Specialist
15 years 2 months ago #8785 by alzander
Oliver,
Just wanted to let you know that version 3.2 of JFBConnect is out now. It has the moderation capabilities for users as well as the ability to add any required, non-mapped, profile fields to the Registration form when a new user logs in.

Hope everything on your site is going well!
The topic has been locked.