Osclass forums

Support forums => Plugins => Facebook Connect => Topic started by: encontra on July 10, 2015, 06:21:52 pm

Title: Facebook redirect error
Post by: encontra on July 10, 2015, 06:21:52 pm
Hi!

After setting up the plugin and the app developer on Facebook, I tried to create an account in the store using facebook.

After the permission screen to use facebook it is normally redirected back to the site, but since this morning it is no longer happening. It simply displays a blank screen and does not create the user (see the attachment).

I did this configuration and testing in 4 different servers, each of different hosts, and yesterday were functioning normally.

I contacted each of the hosts and all said that no change was made on the servers.

You can tell what might be happening?

Tks
Title: Re: Facebook redirect error
Post by: Wachimiro on July 11, 2015, 11:41:56 pm
I have the same problem http://forums.osclass.org/facebook-connect/facebook-plugin-error-redirect/ (http://forums.osclass.org/facebook-connect/facebook-plugin-error-redirect/) I thought it was my hosting provider Hostinger, but maybe facebook has changed something or the plugin is using an old facebook service that no longer works for the new facebook developer accounts.
Title: Re: Facebook redirect error
Post by: Taisson on July 14, 2015, 09:24:04 pm
same problem
Title: Re: Facebook redirect error
Post by: frosticek on July 15, 2015, 12:06:31 am
@encontra
Enable debug mode, check error log and place related problems there.

@Wachimiro
hostinger....
Title: Re: Facebook redirect error
Post by: encontra on July 15, 2015, 12:57:56 am
Hi! Thanks for answer! Here is the log:

[14-Jul-2015 17:52:35 America/Sao_Paulo] CSRF state token does not match one provided.

Its just that..
Title: Re: Facebook redirect error
Post by: yemenifree on July 15, 2015, 02:46:53 am
hello,

the problem from plugin

it's happens when facebook doesn't return email of user , so the osclass can't create new user without email

there are many reasons the facebook doesn't return the email, the one of them is if user does not confirmed his account from email

pls contact with author of plugin to fix it or use my plugin "OSclass Social Auth (http://market.osclass.org/plugins/social-networks/osclass-social-auth_182)" but it's not free  (sorry)



Title: Re: Facebook redirect error
Post by: frosticek on July 15, 2015, 03:17:12 pm
@encontra
Look on forums for this error, there are many topics about it.

@yemenifree
You are not correct.
Title: Re: Facebook redirect error
Post by: encontra on July 15, 2015, 06:12:45 pm
@frosticek
I researched for this problem in the forum before opening this topic, and tried some of the solutions had here, but without success.
Any other suggestions besides those on this board?
Title: Re: Facebook redirect error
Post by: frosticek on July 15, 2015, 07:19:08 pm
@encontra
Well those tokens are little nighmare, it happened to me that tokens blocked front & backoffice for my demo site. It is very hard to disable them, but possible, I explained it there:
http://forums.osclass.org/installation-update-help/invalid-csrf-token/90/ (http://forums.osclass.org/installation-update-help/invalid-csrf-token/90/)
Title: Re: Facebook redirect error
Post by: encontra on July 15, 2015, 09:56:31 pm
- added class="nocsfr" to every form in front office
apparently in version 3.5.3 forms of front office already with the class.

- commentent whole body of function osc_csrf_check in oc-includes/osclass/helpers/hSecurity.php
This is how it should be the function "osc_csrf_check"? If it did not work, the problem continues, plumb erasing entire cache and cookies.

Code: [Select]
function osc_csrf_check() {
        /*$error      = false;
        $str_error  = '';
        if(Params::getParam('CSRFName')=='' || Params::getParam('CSRFToken')=='') {
            $str_error = _m('Probable invalid request.') ;
            $error = true;
        } else {
            $name   = Params::getParam('CSRFName');
            $token  = Params::getParam('CSRFToken');
            if (!osc_csrfguard_validate_token($name, $token)) {
                $str_error = _m('Invalid CSRF token.');
                $error = true;
            }
        }

        if( defined('IS_AJAX') ) {
            if($error && IS_AJAX === true ) {
                echo json_encode(array(
                    'error' => 1,
                    'msg'   => $str_error
                ));
                exit;
            }
        }

        // ¿ check if is ajax request ?
        if($error) {
            if(OC_ADMIN) {
                osc_add_flash_error_message($str_error, 'admin');
            } else {
                osc_add_flash_error_message($str_error);
            }

            $url = osc_get_http_referer();
            // be sure that drop session referer
            Session::newInstance()->_dropReferer();
            if($url!='') {
                osc_redirect_to($url);
            }

            if(OC_ADMIN) {
                osc_redirect_to( osc_admin_base_url(true) );
            } else {
                osc_redirect_to( osc_base_url(true) );
            }
        }*/
    }
Title: Re: Facebook redirect error
Post by: encontra on July 17, 2015, 11:24:13 pm
?
Title: Re: Facebook redirect error
Post by: Taisson on July 18, 2015, 03:08:10 am
the error is still some solution?
Title: Re: Facebook redirect error
Post by: encontra on July 20, 2015, 04:53:27 pm
In my case the solutions suggested have not resolved the problem.
I'm still waiting for a new trial, I do not know the OsClass.
Title: Re: Facebook redirect error
Post by: Taisson on July 22, 2015, 05:36:40 am
Someone could resolve this error?
Title: Re: Facebook redirect error
Post by: frosticek on July 22, 2015, 11:57:00 am
@Taisson
If problem is caused by Facebook Connect plugin only, try to use different version of it, there are many of them that can be found on forums.
Title: Re: Facebook redirect error
Post by: Taisson on July 24, 2015, 06:44:55 pm
I tried all plugins ... No ... What did worked version can be?
Title: Re: Facebook redirect error
Post by: encontra on July 30, 2015, 10:23:40 pm
@frosticek
What version of PHP do you recommend to use for OsClass?
I will test with other versions to see if the problem is resolved.
Title: Re: Facebook redirect error
Post by: frosticek on August 04, 2015, 01:43:01 pm
@encontra
I think I am using 5.3, not sure what are differences in versions...
Title: Re: Facebook redirect error
Post by: SmaRTeY on August 04, 2015, 02:44:05 pm
Guys,

I am using php 5.5.27 and Osclass 3.5.7. and no issue I see with Facebook login plugin but I did do some fix for redirecting.
Also posted something about the same in the plugins forums, is that the same issue as mentioned here?
http://forums.osclass.org/facebook-connect/fcb-improvement/ (http://forums.osclass.org/facebook-connect/fcb-improvement/)

Regards,
Eric
Title: Re: Facebook redirect error
Post by: encontra on August 06, 2015, 10:25:42 pm
@SmaRTeY
Thanks for your suggestion, but isn't about that exactly. Is about this error that occurs when we try to create an account with facebook:

[14-Jul-2015 17:52:35 America/Sao_Paulo] CSRF state token does not match one provided.

Do you know how to fix this?

PS: But I tested your improvement and is really good one. But I have the login button with facebook in all pages, and in this way the button works just if I'm in login page, what is not interesting for my case. =]
Title: Re: Facebook redirect error
Post by: SmaRTeY on August 07, 2015, 12:31:17 am
Quote
But I have the login button with facebook in all pages
I think you could fix that as well but for me only login page is interesting for now ;)

Look about your issue, I have the Facebook plugin without error so let's see what is different:
My most important setup/versions:
- Osclass 3.5.7
- php 5.5.27
- FB Connect plugin 1.4.1
======================
- JQuery 1.11.3
- JQuery UI 1.11.2
- JQuery Validate 1.13.1
- JQuery Migrate 1.2.1

As you can see I have mostly up-to-date versions of JQuery compared with original Osclass BUT I also had to make several changes in core javascript code to make it work so let's first focus on the other versions and especially Osclass & FB Connect.

Next we'll focus on the plugins installed in our systems which might be bugging you.


Regards,
Eric
Title: Re: Facebook redirect error
Post by: etipid.ph on August 07, 2015, 07:17:08 am
I experienced this before.

The problem here is that the E-Mail address (Facebook Account) your are trying to signup/signin is not active

for example: myemailaddress@yahoo.com is my username/login on facebook and it's an active facebook account, but that email is not active on yahoo.

Try to ask your friend/relatives to sign-up to your site with their facebook account.

You must provide a VALID email address.

hope this helps.

thank you.
Title: Re: Facebook redirect error
Post by: SmaRTeY on August 08, 2015, 03:28:58 am
Quote
You must provide a VALID email address.
???

Uhhh YEAH... ;D
Hope this is not the issue being experienced.... that would be a bit lame haha
Title: Re: Facebook redirect error
Post by: etipid.ph on August 08, 2015, 02:09:29 pm
hi smarty,

what I mean is when signing up a facebook account, because if I'm not mistaken you can signup a facebook account even you used an invalid email address.

that's what I've experienced during dry-run of my site.

thanks.
Title: Re: Facebook redirect error
Post by: SmaRTeY on August 08, 2015, 04:12:11 pm
I know, I wasn't 'mocking' you but just smiling since a valid email address is SO..... well logical :)

By the way, doesn't Facebook use email validation?? (ie. send activation email or something?)


Regards,
Eric
Title: Re: Facebook redirect error
Post by: Taisson on August 10, 2015, 12:12:35 am
I made the change and does not work!
No redirects to the website.
Any solution for this error?
Osclass 3.5.7 plugin Facebook 1.4.1

Att