web analytics

Facebook Login does not work with Like box on Question2Answer SnowFlat theme

asked Dec 16, 2015 in Other by Vishki (10,550 points)
edited Dec 21, 2015 by Vishki
I installed the Question2Answer Version 1.7.2 and activated SnowFlat theme. I also have facebook login plugin activated on the site.

When a user clicks on Facebook Login button, the Facebook OAuth login window pops up. After entering username, password and clicking enter, the popup window closes but the login does not work. If I press the login button again, the popup opens and closes again in a split second.

(If the user is already logged into facebook, then the popup opens and closes in a split second).

What is the solution?

1 Answer

0 votes
answered Dec 16, 2015 by Vishki (10,550 points)

I faced this issue with facebook login on Question2Answer version 1.7.2 and SnowFlat theme.

I identified the issue to exist only when I use Facebook Page Plugin(which is new option for Facebook Likebox). Looks like the scripts for Facebook Page Plugin and Login are interfering when using SnowFlat theme. If another theme/template is activated, the issue does not exist(checked with Snow template).


Facebook Page Plugin comes as a two part script. The first part is the Javascript SDK script that facebook recommends to be place just after the <body> tab and the second part is the script for actual Page Plugin.

I placed the second part under "Custom HTML in sidebar box of everypage" (admin>>layout).

I tried placing the first part (Javascript SDK) in "Custom HTML at top of every page" and "Custom HTML in <head> section of every page". Placing JSSDK in any of these sections results in the said error.

To resolve this, I placed both First part and Second part(Javascript SDK and Page Plugin Script) together in "Custom HTML in sidebar box of everypage" (Javascript SDK followed by Page Plugin). By placing this way, the issue is resolved. Idea is to load the Javascript SDK script just before login Page Plugin script. This is unlike what facebook recommends(just after body tag), but this resolved the issue and I'm now able to use Facebook Login button normally.

After the above change, the Oauth window opens normally and after entering username and password, the pop up closes and the user is able to login to the site.

Related questions

1 answer 10,118 views
1 answer 2,405 views

Like us on Facebook

114 questions

117 answers


8 users