Topic-icon Import social profile data to specific table

Active Subscriptions:

None
11 years 2 months ago - 11 years 1 month ago #52442 by klox7
Hello,

I will probably add last name field to Joomla registration form and I need to know how JFB saves social name and last name to Joomla users table. I know it stores it in name field as combined but would there be posibility to modify JFB to store first name in existing name field and last name in custom added last name field?

Hope I'm being clear.

Regards
Last edit: 11 years 1 month ago by klox7.
The topic has been locked.
Support Specialist
11 years 2 months ago #52448 by alzander
JFBConnect uses the standard Joomla User component for storing the basic user profile information. That component only stores name, email and password information. If you want extended information, like first name and last name, you'd need to use an additional extension.

One option that may work for you is the User - Profile plugin that comes with Joomla. That plugin has an xml file which you can edit to add your own custom fields to be asked during registration. JFBConnect has a Social Profiles - Joomla plugin which would let you select how to import social network profile data into the user's extended profile.

The one problem with that method, however, is that the 'name' field for core Joomla will still display, which could be confusing. There's nothing we can do about that in JFBConnect as that field is a requirement of Joomla.

I hope that helps explain,
Alex
The topic has been locked.
Active Subscriptions:

None
11 years 1 month ago #52533 by klox7
Hello, thanks for answering.

I decided to use Easy Profile extension for user profile. This extension let's you insert last name for user. I saw that JFB has the "custom db" option. Is it possible to send last name from social network to easy profile table in last name column? Do you have any documentation?

Do you also maybe know any best practices for jfbconnect to easyprofile integration?

Regards
The topic has been locked.
Support Specialist
11 years 1 month ago #52540 by alzander
We haven't used Easy Profile yet, but I know there are a few JFBConnect users that have them working together.

The Custom DB plugin was meant for just such a circumstance and may work with Easy Profile. Basically, to configure it, you need to:
* Enable the plugin
* In the JFBConnect -> Profiles -> Custom DB section setup your database properly:
* You can leave the database name, user and password blank since you're using the Joomla database
* Set the table name to whatever table Easy Profile uses to store data
* Click "Save"
* In the bottom portion, you should now be able to set which column of the selected table is used to store profile data from each network

Test and, hopefully, that helps get you going.

If you have any questions, just let us know.

Thanks,
Alex
The topic has been locked.
Active Subscriptions:

None
11 years 1 month ago - 11 years 1 month ago #52576 by klox7
1.
I think this will work.

Just one thing. If you enter wrong table name you get error

An error has occurred.
1146 Table 'database_name.#_table_name' doesn't exist SQL=SHOW FULL COLUMNS FROM `#_jsn_users`

And if you then click on JFBConnect->Profiles you get same error again and again and you are locked out of editing Profiles.

2.
Another question regarding sending data from jfb to easyprofile.

I have set required field in easyprofile which are visible only on registration and not on edit profile page. If you log in with facebbok (jfb) it first takes you to edit profile page if there are any required fields. But required fields which are hidden on profile edit page are not visible so user can select them.

Can I somehow pass custom value from jfb to easyprofile db upon login with social profile?

3.
Do you maybe know where Facebook stores user country or whar acctually to select in Profile Import Configuration for country?
Last edit: 11 years 1 month ago by klox7.
The topic has been locked.
Active Subscriptions:

None
11 years 1 month ago - 11 years 1 month ago #52577 by klox7
***deleted***
See previous question!
Last edit: 11 years 1 month ago by klox7.
The topic has been locked.
Support Specialist
11 years 1 month ago #52597 by alzander
1) We haven't heard of this problem before and will have to look into how better to handle it in the code. For now, I'd recommend editing /plugins/socialprofiles/customdb/customdb.php. Around line 103 at the bottom, you'll see a line that looks like:
$columns = $dbo->getTableColumns($settings->get('db_table'));
Right before that, add the following line so it looks like:
return $default;
$columns = $dbo->getTableColumns($settings->get('db_table'));
That should bypass that error and let you re-configure the table name. Once set right, remove that extra line to configure.

2) We don't have a way to pre-fill EasyProfile fields on the fly. However, you should be able to import data into those fields using the Custom DB profile plugin, assuming the profile data and registration data are stored in the same table. That way, when the user goes to the Edit Profile page, the values are already populated as though they filled them in already.

3) Facebook looks to have recently added an "Address" field that is retrievable for each profile. We'll have to look into this more because it seems to allow you to get the users street address, city, state and country, which I'm very, very surprised about. Until this change, all we could get was the "Current Location" field, which was a pointer to a Facebook Page for the user's city. It was a lot more kludgy to get information like city, state and country from that, but possible.. it's also why we just have "Current City, State" as an import option and not country.

I've added this investigation to our to-do list.

I hope that helps, but if you need anything else, just let me know.

Thanks,
Alex
The topic has been locked.
Active Subscriptions:

None
11 years 1 month ago - 11 years 1 month ago #52619 by klox7

alzander wrote: 2) We don't have a way to pre-fill EasyProfile fields on the fly. However, you should be able to import data into those fields using the Custom DB profile plugin, assuming the profile data and registration data are stored in the same table. That way, when the user goes to the Edit Profile page, the values are already populated as though they filled them in already.


But Custom DB profile plugin is just to import data from social profiles not custom options, right?

Do you think I will be able to do it with this plugin Trigger plugin ? What would I have to know in jfb to make this work? Something like if user logs in with jfb (social account) then update user.
Last edit: 11 years 1 month ago by klox7.
The topic has been locked.
Support Specialist
11 years 1 month ago #52645 by alzander

But Custom DB profile plugin is just to import data from social profiles not custom options, right?

Correct. Possibly I'm mis-understanding what you want to do though. Basically, I thought you were wanting that after the user is logged in, they are redirected to their "Edit Profile" page with the data pre-filled on that page with some of their social profile data.

If so, then the Custom DB should be able to help here by pre-populating the data in the EasyProfile database. During registration the data will be imported. The user won't be able to prevent this but, when they are redirected to the Edit Profile page, Easy Profile should be showing the data that JFBConnect stored in the DB for the user. At that point, the user is free to change the data if they want.

I hope that makes sense, but if not, or you if you're looking for something different, please describe it specifically and how its different than what I noted above.

Thanks,
Alex
The topic has been locked.
Active Subscriptions:

None
11 years 1 month ago - 11 years 1 month ago #52646 by klox7
Yes, basically I wanted to import data from social profiles to easyprofile with help of customdb of jfbconnect. That works OK. But I'm having one field in easy profile which is called user type and I can't populate this field with values form social profiles because it has a specific purpose. So I wanted to know if login with jfbconnect can pass custom values to easy profile. But I guess I need custom plugin for this.

Regarding Facebook import configuration - there is no Avatar import on select?

Regards
Last edit: 11 years 1 month ago by klox7.
The topic has been locked.