有什么有效的解决方案可以防止Facebook像Box这样的容器或者其他东西不被破坏吗?已经将异步设置为TRUE,但仍然退出。正如我在堆栈溢出中所看到的,只有fb:login_button,存在问题,但是我收到了控制台的相同警告:
fb:like_box failed to resize in 45s
总之,这是我的代码,也许我遗漏了什么。
HTML标签
<html lang="en" xmlns:fb="http://ogp.me/ns/fb#">
FB初始化
<script type="text/javascript">
window.fbAsyncInit = function() {
FB.init({
appId: <?php echo $this->config['facebook']['appId']; ?>,
status: true,
cookie: true,
xfbml: true
});
/* All the events registered */
FB.Event.subscribe('auth.login', function (response) {
// do something with response
alert("login success");
});
FB.Event.subscribe('auth.logout', function (response) {
// do something with response
alert("logout success");
});
FB.getLoginStatus(function (response) {
if (response.session) {
// logged in and connected user, someone you know
alert("login success");
}
});
};
(function () {
var e = document.createElement('script');
e.type = 'text/javascript';
e.src = document.location.protocol + '//connect.facebook.net/en_US/all.js';
e.async = true;
document.getElementById('fb-root').appendChild(e);
} ());
</script>
FB样盒
<div class="facebook-plugin">
<div class="fb-like-box" data-href="https://www.facebook.com/****" data-width="346" data-show-faces="true" data-header="true" data-stream="false" data-show-border="true"></div>
</div>
就是这个。任何帮助都将不胜感激。提前感谢!
发布于 2015-08-06 03:12:14
因此,新的Facebook API升级,他们放弃了喜欢盒,因此这不再是一个问题。
随着GraphAPIv2.3的发布,类似于的Box插件就不再受欢迎了。请使用新的页面插件。页面插件允许您将页面内容的简单提要嵌入到您的网站中。 如果您不手动升级到Plugin,您的同类Box插件实现将在2015年6月23日前自动返回到plugin。
页面插件链接是https://developers.facebook.com/docs/plugins/page-plugin
https://stackoverflow.com/questions/23013413
复制