Facebook login social plugin stopped working
Last week suddenly the XFBML login button stopped working on our site. Instead of showing a nice FB login button, it just shows the button text. In Firebug, I'm getting an error:
TypeError: k.root is null
Strangely, the problem occurs on our production environment, test environment and my own development environment. The production environment hasn't been updated or changed for quite some time so it's not code changes on our end. All three environments also connect to separate Facebook apps, each with a different appID, so it also can't be a (accidental) configuration error with the Facebook app.
Does anyone know if it's perhaps possible that this is an issue on Facebook's end? They did do a compatibility breaking update on 5th of September, but as far as I can see, the changes are not related to the login button.
Anyone know what could possibly cause this?
This was a bug that would occur if you called FB.init prior to document.body being defined, (as in the HEAD), this has now been resolved.
I started to face this issue last week as well. I managed to solve with one of the options below:
1) The app's 'App Domains' was misconfigured (it should be a domain name and not a full URL): Source: https://developers.facebook.com/bugs/225729134220754
2) Just replace the div (containing class fb-login-button) with a regular button to call FB.login, and all the things will start to work again.