Hi

create the function on components/come_user/controller.php file

function FaceBookUserAuthentication() {

// Check for request forgeries $profileid = JRequest::getVar(‘profileid’, ”, ‘get’, ‘profileid’); $callback = JRequest::getVar(‘callback’, ”, ‘get’, ‘callback’);
$db =& JFactory::getDBO(); $query = “SELECT * FROM #__community_connect_users as cu , #__users as ju where ju.id = cu.userid and cu.connectid = ‘$profileid'”; $db->setQuery($query); $column = $db->loadAssoc(); if(count($column) > 0) { $output = array(‘Success’ => ‘True’,’email’ => $column[’email’]); } else { $output = array(‘Success’ => ‘False’,’email’ => ”); }
if ($callback) { header(‘Content-Type: text/javascript’); echo $callback . ‘(‘ . json_encode($output) . ‘);’; } else { header(‘Content-Type: application/x-json’); echo json_encode($output); } die; }