Hello Folks!
I want to offer Facebook, Twitter and Google login/registration option for JomSocial on my website. Facebook, Twitter and Google Apps are up and running. Already changed ../templates/ja_social_ii/html/mod_community_hellome/default.php from:
<?php }else{
$config = CFactory::getConfig();
$usersConfig = JComponentHelper::getParams('com_users');
$fbHtml = '';
if ($config->get('fbconnectkey') && $config->get('fbconnectsecret') && !$config->get('usejfbc')) {
$facebook = new CFacebook();
$fbHtml = $facebook->getLoginHTML();
}
if ($config->get('usejfbc')) {
if (class_exists('JFBCFactory')) {
$providers = JFBCFactory::getAllProviders();
$fbHtml = '';
foreach($providers as $p){
$fbHtml .= $p->loginButton();
}
}
}
?>
to
<?php }else{
$config = CFactory::getConfig();
$usersConfig = JComponentHelper::getParams('com_users');
$fbHtml = '';
if ($config->get('fbconnectkey') && $config->get('fbconnectsecret') && !$config->get('usejfbc')) {
$facebook = new CFacebook();
$fbHtml = $facebook->getLoginHTML();
}
$twitterHtml = '';
/* Twitter login */
if ($config->get('twitterconnectkey') && $config->get('twitterconnectsecret') && !$config->get('usejfbc')) {
$twitter = new CTwitter();
$twitterHtml = $twitter->getLoginHTML();
}
$linkedinHtml = '';
/* LinkedIn login */
if ($config->get('linkedinclientid') && $config->get('linkedinsecret') && !$config->get('usejfbc')) {
$linkedin = new CLinkedin();
$linkedinHtml = $linkedin->getLoginHTML();
}
$googleHtml = '';
/* Google login */
if ($config->get('googleclientid') && !$config->get('usejfbc')) {
$google = new CGoogle();
$googleHtml = $google->getLoginHTML('hellome');
$document->addCustomTag('<script src="https://apis.google.com/js/api:client.js"></script>');
}
if ($config->get('usejfbc')) {
if (class_exists('JFBCFactory')) {
$providers = JFBCFactory::getAllProviders();
$fbHtml = '';
foreach($providers as $p){
$fbHtml .= $p->loginButton();
}
}
}
?>
and the additional buttons for Twitter and Google will show. So that's fine.
Also the Facebook Login/Registration with and without connecting to a already registered user works.
Issue: Google Login/Registration and Twitter Login/Registration
1. Click on Sign in with Google or Sign in with Twitter in the HelloMe module
2. Popup window regarding the Google/Twitter Connection shows up
3. Log into Google/Twitter and allow the App to connect
4. Popup closes automatically
5. Website reloads and shows "You have to login first" - no user creation, no confirmation, simply nothing.
Any ideas, why this won't work? Sometimes it shows the "Create new user OR Connect with existing user" modal window too, sometimes not.
Thanks for your help!
Best regards
Stefan