× Joomla Facebook Connect support forum

Topic-icon grabbing the user information via connect

Active Subscriptions:

None
14 years 10 months ago #1397 by t1t2t3t4
help help help

I would like the Connect to populate joomla profile fields by pulling information from Facebook. A user's first name, last name, age/birthdate, and location/hometown should automatically come into joomla/jomsocial when they joing with facebook connect
The topic has been locked.
Support Specialist
14 years 10 months ago #1413 by alzander
I think all of those (except age/birthdate) are options to use in the "JomSocial Integration" tab. You just need to map the Facebook field name "Location - Hometown" to whatever JomSocial field you've created to import it into.

Not sure if you're saying it's not working or your having some other issue. Just let us know where the problem lies :)
The topic has been locked.
Active Subscriptions:

None
14 years 10 months ago #1425 by t1t2t3t4
help help help

you have told that facebook has provided you fields that you map with jomsocial. and there is no birthday field provided by them.
you are wrong sir. we can fetch all fields from facebook using Users.getInfo function i.e. already declared in facebook php library that you used.

see it i have edited this file /administrator/components/com_jfbconnect/models/config.php
there is a function public static $fbProfileFields = array. and aded this 'birthday'=>'birthday', in the array.

result :- on jomsocial-facebook field maping it gives me option of birthday also. and it fetches the user birthday success fully. my mean to say like birthday'=>'birthday, you can add all facebook fields in array and they are shown on jfbc jomsocial maping. e.g. 'education_history.year'=>'graduatin year','education_history.degree'=>'college or university', etc.

then see this function getJsFields().
you have used $query = 'SELECT * FROM #__community_fields WHERE type="text" OR type="textarea"';
it means it shows only those fields of jomsocial who are text and textarea where as birthday is date in my jomsocial.
i have used :- $query = 'SELECT * FROM #__community_fields order by "asc"';

result :- it shows all fields from jomsocial for maping on jfbc component
important thing--- make your jomsocial birthday field text bcs the facebook send birthday in text format not in date format

by this process i have fetch all jomsocial fields and all facebook fields for maping. i have tested it and it works fine.means facebook does not provide you fileds you can fetch anything and show them on jomsocial profile by maing.



i like this component so i try to work on it.



one another thing that is wrong here is it does not update the profile in jomsocial if we give facebook info to existing user. it works only on new user creation. i am also trying to find its solution, when i succeeded i should told you.

if you have any solution to do it pls tell me. i am waiting for your response

thanks
with regard
sanjay thakur
The topic has been locked.