facebookauthenticationprestashopsocial-media

Facebook login redirect error Prestashop tmsociallogin


I have a problem with facebook login on Presta Shop. I am using TemplateMonster Social login plugin (tmsociallogin). It worked a few months ago but now it stopped. I am receiveng error:

"Can't Load URL: The domain of this URL isn't included in the app's domains. To be able to load this URL, add all domains and subdomains of your app to the App Domains field in your app settings."

Urls and paths are set correctly in apps settings I think (correct domain, correct redirect URL, correct app domain). You can see my setting on screen shots below.

I have found a lot of answers but everywhere I've seen that I have to uncheck "Use Strict Mode for Redirect URIs" in fb app settings. I cant do that - this option is hardly checked as "Yes" and I can not do anything about that.

Please anybody help me :( Prestashop version 1.6

Apps settings 1

Apps settings

Apps settings 2

Apps settings

Facebook error

Facebook error


Solution

  • It happens because Facebook has changed a security policy and forbidden to use nonstrict mode for a redirect. But the module was using this option to redirect to the same page after login. So now it causes the issue. In order to solve this, you need to remove all mentions about a "back" parameter within all files which are related to Facebook login functionality. I don't know exactly your version of the module but I think the list of files will be the same

    controllers/facebooklogin.php
    controllers/facebookregistration.php
    views/templates/hook/header-account.tpl
    views/templates/hook/social-login-buttons.tpl
    

    In the *.tpl files remove only that entities which are related to facebook. And in your Facebook API you must to add two redirect URLs.: Whether you use Friendly URL

    - your_domain/module/tmsociallogin/facebooklink
    - your_domain/module/tmsociallogin/facebooklogin
    

    or not

    - your_domain/index.php?fc=module&module=tmsociallogin&controller=facebooklogin
    - your_domain/index.php?fc=module&module=tmsociallogin&controller=facebooklink
    

    Also, if you aren't sure yet which mode are you gonna use then you can add all four variants.