J3, Creativity template and Facebook Authentication problem

Feel free to talk about everything related to our Joomla Products
Rate this topic: Evaluations: 0, 0.00 on the average.Evaluations: 0, 0.00 on the average.Evaluations: 0, 0.00 on the average.Evaluations: 0, 0.00 on the average.Evaluations: 0, 0.00 on the average.Evaluations: 0, 0.00 on the average.
teitbite
Thu Sep 11, 2014 10:55 am
Hi

We do take care of facebook app. The fact that username becomes "facebook" is correct. It's a signal for joomla to run a facebook authentication script, so problem may be with wrong API in facebook authentication. Show me Your site so I'll check console and learn something about the problem.
User avatar
Moderator

GK User
Thu Sep 11, 2014 1:14 pm
teitbite wrote:Hi

We do take care of facebook app. The fact that username becomes "facebook" is correct. It's a signal for joomla to run a facebook authentication script, so problem may be with wrong API in facebook authentication. Show me Your site so I'll check console and learn something about the problem.



thanks..
I sent you private message. with my web link.
User avatar
Senior Boarder

GK User
Thu Sep 11, 2014 9:44 pm
I have tried to delete the old app on developers page and make a new one. Everything works but I just get this message: "Username and password do not match or you do not have an account yet." Can u please check it again? :blush:


teitbite wrote:Hi

I can see an error telling that application is not configured correctly. You need to check the settings in app directly in Your facebook account. Start from checking if it's enabled for a public use.
User avatar
Junior Boarder

GK User
Thu Sep 11, 2014 9:58 pm
superlars wrote:I have tried to delete the old app on developers page and make a new one. Everything works but I just get this message: "Username and password do not match or you do not have an account yet." Can u please check it again? :blush:


teitbite wrote:Hi

I can see an error telling that application is not configured correctly. You need to check the settings in app directly in Your facebook account. Start from checking if it's enabled for a public use.


it is same problem. it says "Doesn't match" because it becomes "username:facebook"
on the other hand, i've noticed that Facebook changed API features . maybe the coding must be different on website.
User avatar
Senior Boarder

teitbite
Fri Sep 12, 2014 9:17 am
Hi

I think You are right. Authentication went through, but account is not created correctly. I would say it's because of the recent changes to facebook script. Please send me an access to joomla pane and ftp. Please put and url to Your site too, so I will not need to look in PMs.
User avatar
Moderator

teitbite
Fri Sep 12, 2014 12:39 pm
Hi

I got Your access and passed it to programmers. Will let You know as soon as I'll get an answer.
User avatar
Moderator

GK User
Fri Sep 12, 2014 12:43 pm
teitbite wrote:Hi

I got Your access and passed it to programmers. Will let You know as soon as I'll get an answer.



thank you all :)))
User avatar
Senior Boarder

teitbite
Mon Sep 15, 2014 2:13 pm
Hi

Facebook Authentication plugin was outdated. Now everything works fine.
User avatar
Moderator

GK User
Mon Sep 15, 2014 2:54 pm
teitbite wrote:Hi

Facebook Authentication plugin was outdated. Now everything works fine.



Yes, it works fine. Thank you so much! :D
User avatar
Senior Boarder

GK User
Sun Sep 21, 2014 5:36 pm
teitbite wrote:Hi

Facebook Authentication plugin was outdated. Now everything works fine.


Sorry.. :oops: Something was problem about K2. So i had to restore all website with back-up. Could you do it again.
thanks :))
User avatar
Senior Boarder

teitbite
Mon Sep 22, 2014 10:03 am
Hi

Please just update "Facebook Authentication" plugin, this will do :)
User avatar
Moderator

GK User
Mon Sep 22, 2014 2:11 pm
teitbite wrote:Hi

Please just update "Facebook Authentication" plugin, this will do :)


from where can i update facebook authentication? are you talking about plugin?
User avatar
Senior Boarder

teitbite
Tue Sep 23, 2014 12:10 pm
Hi

Yes, You can use a plugin package ad install it with joomla installer or simply overwrite files with the newest version of the plugin in /plugins/authentication/facebook folder via FTP.
User avatar
Moderator

GK User
Thu Sep 25, 2014 12:37 pm
I got it.
thank you ))
User avatar
Senior Boarder

GK User
Thu Oct 02, 2014 2:22 pm
Hi all,

I have tried everything suggested and have updated the plugin but it keeps giving me the same "Username and password do not match or you do not have an account yet." error message.

It is all set for public use and the API and Secret Pass are updated and correct.

Any help would be appreciated.
Thanks
User avatar
Fresh Boarder

teitbite
Fri Oct 03, 2014 12:44 pm
Hi

Please send me an access to Your joomla panel.
User avatar
Moderator

GK User
Sun Nov 02, 2014 10:41 pm
Can you check mine as well if i send you login info?
User avatar
Junior Boarder

teitbite
Mon Nov 03, 2014 11:03 am
Hi

Of course. Please send it to me.
User avatar
Moderator

teitbite
Mon Nov 03, 2014 5:37 pm
Hi

@superlars thank You for login access, but I do not know Your website's url :) Please send all details with url again.
User avatar
Moderator

teitbite
Wed Nov 05, 2014 9:24 am
Hi

I've checked and script is called properly. Problem starts when account is being created. Please make sure the facebook authentication plugin is up to date. ...and better reinstall it even if it is. If this will not help please send me ftp access.
User avatar
Moderator

teitbite
Mon Nov 10, 2014 4:39 pm
Hi

I cannot figure out what is wrong. I've replaced the code with the newest version of the script but it's still not working. I'm gonna show this to programmers and let You know when I'll got an answer.
User avatar
Moderator

GK User
Wed Nov 12, 2014 3:38 pm
Ok, thank you. Looking forward to hear from you =)
User avatar
Junior Boarder

teitbite
Thu Nov 13, 2014 10:04 am
Hi

Sorry, still no answer. I will try to rush it a little bit. Hope it will help.
User avatar
Moderator

GK User
Fri Nov 14, 2014 12:09 am
:D :whistle:
User avatar
Junior Boarder

teitbite
Sat Nov 15, 2014 10:53 am
Hi

Please edit file /plugins/authentication/facebook/facebook.php and replace the content with this:

Code: Select all
<?php

/**
* Authorization plugin
* @Copyright (C) 2009-2011 Gavick.com
* @ All rights reserved
* @ Joomla! is Free Software
* @ Released under GNU/GPL License : http://www.gnu.org/copyleft/gpl.html
* @version $Revision: GK4 1.0 $
**/

// No direct access
defined('_JEXEC') or die;

jimport('joomla.plugin.plugin');

class plgAuthenticationFacebook extends JPlugin
{
    function onUserAuthenticate($credentials, $options, &$response)
    {
        jimport('joomla.user.helper');
        jimport('joomla.user.helper');

        $response->type = 'Joomla';
        // Joomla does not like blank passwords
        if (empty($credentials['password'])) {
            $response->status = JAuthentication::STATUS_FAILURE;
            $response->error_message = JText::_('JGLOBAL_AUTH_EMPTY_PASS_NOT_ALLOWED');
            return false;
        }

        if($credentials['password'] == 'Facebook' && $credentials['username'] == 'Facebook') {
            $plugin = JPluginHelper::getPlugin('authentication', 'facebook');
            $params = json_decode($plugin->params);         

            require 'sdk/facebook.php';

            $facebook = new Facebook(array(
              'appId'  => $params->facebook_api_id,
              'secret' => $params->facebook_api_secret
            ));

            // See if there is a user from a cookie
            $user = $facebook->getUser();
            $user_profile = null;

            if ($user) {
              try {
                // Proceed knowing you have a logged in user who's authenticated.
                $user_profile = $facebook->api('/me');
              } catch (FacebookApiException $e) {
                $response->status = JAuthentication::STATUS_FAILURE;
                $response->error_message = $e->getMessage();
                $user = null;
                return false;
              }
            }

            if($user_profile) {
                // Initialise variables.
                $conditions = '';
                // Get a database object
                $db     = JFactory::getDbo();
                $query  = $db->getQuery(true);
                $query->select('id');
                $query->from('#__users');
                $query->where('email = ' . $db->Quote($user_profile['email']));
                $db->setQuery($query);
                $result = $db->loadObject();

                if ($result) {
                    $user = JUser::getInstance($result->id); // Bring this in line with the rest of the system
                    $response->email = $user->email;
                    $response->username = $user->username;
                    $response->fullname = $user->name;

                    if (JFactory::getApplication()->isAdmin()) {
                        $response->language = $user->getParam('admin_language');
                    } else {
                        $response->language = $user->getParam('language');
                    }

                    $response->status = JAuthentication::STATUS_SUCCESS;
                    $response->error_message = JText::_('PLG_GK_FACEBOOK_SUCCESS') . '<strong>' . $user->username . '</strong>';
                } else {
                    if($params->auto_register == 1) {
                        $response->email = $user_profile['email'];
                        $response->username = $user_profile['email'];
                        $response->fullname = $user_profile['name'];

                        $response->status = JAuthentication::STATUS_SUCCESS;
                        $response->error_message = JText::_('PLG_GK_FACEBOOK_NEW_ACCOUNT') . '<strong>' . $user_profile['name'] . '</strong>';
                    } else {
                        $response->status = JAuthentication::STATUS_FAILURE;
                        $response->error_message = JText::_('JGLOBAL_AUTH_NO_USER');
                    }
                }
            }
        } else {
            $response->status = JAuthentication::STATUS_FAILURE;
            $response->error_message = JText::_('JGLOBAL_AUTH_NO_USER');
        }

        return $response;       
    }
}

?>


Next thing is to edit /layout/blocks/social.php and find this line:

Code: Select all
} else if(jQuery('com-login-form').length > 0) {


than replace it with:

Code: Select all
} else if(jQuery('#com-login-form').length > 0) {



This fix will be included in packages soon.
User avatar
Moderator

GK User
Sat Nov 15, 2014 4:37 pm
Hi, and thank you so much=)

I couldnt do the last part: "Next thing is to edit /layout/blocks/social.php and find this line:"

I dont have the "blocks" folder :?: What will this fix do?

But i can finaly log in using facebook =)
User avatar
Junior Boarder

teitbite
Sun Nov 16, 2014 11:35 am
Hi

We do care about facebook, why would we add it to our templates if we don't?

Please also look at this post https://www.gavick.com/forums/news2-joo ... ok#p203585

I'm afraid there were a small mistake from our side when developers during updating the plugins code has put its old version into packages by mistake. It will be corrected soon, but meanwhile use the solution from post I've mentioned.
User avatar
Moderator

teitbite
Thu Nov 20, 2014 6:09 pm
Hi

I just recived an information that all packages has been updated with a fixed facebook authentication plugin and a fixes to social.php file. There should be no problem now.
User avatar
Moderator

GK User
Fri Apr 24, 2015 12:52 pm
I too have tried and tried but Facebook sign up does not seem to work. I am using the latest version of the template here: http://www.bfcgroup.gr

For me the facebook pop up does not even "pop"!!! The button does nothing. It is completely unresponsive.

Is there some other tweak I can make? As I said I updated the site and the facebook login to the latest version that was released on the 14th of April 2015
User avatar
Senior Boarder

teitbite
Sat Apr 25, 2015 4:25 pm
Hi

This is a very old thread. In Your case it looks like a javascript conflict. Try installing Easy jQuery and replace all used jquery libraries with one.
User avatar
Moderator

GK User
Thu May 21, 2015 4:42 pm
I have the same problem and I installed easyJquery but do not understand how to set it.
Could you help me?
User avatar
Expert Boarder

teitbite
Sat May 23, 2015 9:20 pm
Could you please provide me with a URL to your website and back-end access via PM (click the “Private Message” text underneath my avatar) so that I may analyze it? It is a lot easier for us to diagnose issues when we have a live site to examine.
User avatar
Moderator

GK User
Sat May 23, 2015 9:32 pm
send it tnx
User avatar
Expert Boarder

teitbite
Sun May 24, 2015 1:08 pm
Hi

Setting Easy jQuery makes no difference. Please update template to the latest version as well as facebook authentication plugin which should be in rest_files package. If this will not help please send me an access to ftp.
User avatar
Moderator

GK User
Mon May 25, 2015 2:49 pm
I updated the template and also facebook authentication plugin seems to be the latest version.
But the login still does not work, you send in pvt also access FTP.
tnx
User avatar
Expert Boarder

teitbite
Wed May 27, 2015 4:42 pm
Hi

After an update I can see an error in console. Which says:

Application Error: Problem with downloading the data for the selected application. The application may be incorrect or may have been temporary technical problems. Try again later.


So either the app is not configured properly in facebook developer page or You have generated api and secret for different app.
User avatar
Moderator

GK User
Thu May 28, 2015 3:35 pm
first it did not work for nothing, now after your help I see the error. I corrected the generated api and now it works well.

thanks
User avatar
Expert Boarder

teitbite
Sat May 30, 2015 5:19 pm
Hi

Good it could be resolved thanks to this error. We could be looking for right answer much longer :)
User avatar
Moderator


cron