After click on "login with fb" module does nothing


If your "login with facebook" button does not create an account or log in customer to your shop - this means that there is something wrong with facebook application (usually). To verify and fix the problem please follow suggestions below.

How to check if problem is related to Facebook APP ID?

Firstly please verify if you configured Facebook Application settings on module configuration page. Make sure that you defined own unique APP ID and filled out language code field.

Then it is time to verify where the problem exactly is. To find the errors related to your problem, it will be necessary to analyse browser console output

  1. go to page where you've got the issue
  2. turn on browser console (in chrome: ctrl+shift+j)
  3. clear console
  4. refresh the page
  5. hit "facebook login button"
  6. analyse console output
  7. you will probably see errors there related to facebook application

 



Error example: URL BLOCKED, URI is not whitelisted
Error exmaple: Facebook OAuth “The domain of this URL isn't included in the app's domain”

URL Blocked: This redirect failed because the redirect URI is not whitelisted in the app’s Client OAuth Settings. Make sure Client and Web OAuth Login are on and add all your app domains as Valid OAuth Redirect URIs.

or


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.

 

or

FB is not defined / FB.login() called before FB.init()

These errors are stricly related to facebook application settings. Please go to facebook application configuration page (on facebook side) and open settings > basic section. Verify if your "app domains" field contains current domain of your shop. Verify also if "website" section contains current URL to your shop.

 

Possible solution 1: reconfigure application settings

facebok app settings


The other thing associated with this issue is related to "product > facebook login > settings" section. There is a "client oauth settings" section where you have to put "valid OAuth redirect URIs". Make sure that this field contains current url to your shop.

facebook app configuration

 

 

Possible solution 2: conflict with other facebook module

Another possibility related to issues mentioned above is fact, that your website uses another facebook app id than defined in fblogin module configuration page. This is probably source of the problem - especially when your app is properly configured. In this case it is necessary to find the module that includes bad application id and remove this bad app. 

Default facebook block module
If you use standard default facebook block module, there is a chance that this is the source of the problem. Main issue with this plugin never fixed by PrestaShop is fact that it includes app id that is not associated with your shop domain! just imagine how dangerous it is - they (prestashop) just can manage comments about your website, ban users etc (!).

To Fix this problem:

  1. go to modules > positions
  2. search there for list of modules named "displayHeader"
  3. unhook module named "facebook block" from this hook

After that - this module will use proper library defined in the facebook login module.