Topic-icon It's vital that I have gender and country - how can I do that?

Active Subscriptions:

None
I saw in another thread that Gender and County aren't supported as import fields from Facebook.

I'm running a site for expats around the world, so country is kind of vital.

You mentioned that I would need to add some code to get this to work, could you spell that out as clearly as possible?

Will these be in the next update, seems like a nobrainer. ;-)

Thanks
The topic has been locked.
Support Specialist
You can make a quick edit to the JomSocial Profile plugin that should allow importing of the gender and country values, but you'll need to test a bit. The main thing to check for is that the values imported from Facebook match up with the options available in JomSocial. For instance, Facebook (I think) responds with Male and Female. Therefore, in JomSocial, you'd need to use those same options for the Gender field. The same goes for country, which I think Facebook responds with something like United States. Because of that, you want to use that value instead of US or USA.

To make the change, please edit the /plugins/socialprofiles/jomsocial/jomsocial.php file. Around line 75, you'll see:
$query = 'SELECT * FROM #__community_fields WHERE type="text" OR type="textarea" OR type="date" OR type="birthdate" OR type="url" ORDER BY ordering';
Update that to:
$query = 'SELECT * FROM #__community_fields WHERE type="text" OR type="textarea" OR type="date" OR type="birthdate" OR type="url" OR type="country" OR type=”gender” ORDER BY ordering';
Test and let us know how that goes!
Alex
The topic has been locked.