简体   繁体   English

Facebook登录社交插件停止工作

[英]Facebook login social plugin stopped working

Last week suddenly the XFBML login button stopped working on our site. 上周突然XFBML登录按钮停止在我们的网站上工作。 Instead of showing a nice FB login button, it just shows the button text. 它没有显示一个漂亮的FB登录按钮,而是显示了按钮文本。 In Firebug, I'm getting an error: 在Firebug中,出现错误:

TypeError: k.root is null TypeError:k.root为空

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. 所有这三个环境还连接到单独的Facebook应用程序,每个应用程序具有不同的appID,因此,这也不会是Facebook应用程序的(偶然)配置错误。

Does anyone know if it's perhaps possible that this is an issue on Facebook's end? 有谁知道这是否可能是Facebook的问题? 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. 他们确实在9月5日进行了兼容性突破性更新,但据我所知,所做的更改与登录按钮无关。

Anyone know what could possibly cause this? 有人知道这可能导致什么吗?

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 1)应用程序的“应用程序域”配置错误(应该是域名,而不是完整的URL):来源: https//developers.facebook.com/bugs/225729134220754

or 要么

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. 2)只需将div(包含fb-login-button类的div)替换为常规按钮以调用FB.login,一切便会重新开始工作。

如果您在定义document.body之前调用FB.init(如在HEAD中),将会发生此错误,现在已解决。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM