Search code examples
facebookxfbmlfacebook-login

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?


Solution

  • 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.