gpt4 book ai didi

facebook-javascript-sdk - FB :like_box failed to resize in 45s

转载 作者:行者123 更新时间:2023-12-04 16:09:52 24 4
gpt4 key购买 nike

是否有任何有效的解决方案可以防止 Facebook Like Box 不破坏他的容器或其他东西?已设置 异步 到 TRUE 但仍然出局。正如我在 stackoverflow 上看到的,只有 有问题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 Like Box
<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>

就是这个。任何帮助,将不胜感激。提前致谢!

最佳答案

由于新的 Facebook API 升级,他们放弃了 Like Box,因此这不再是问题。

With the release of Graph API v2.3, the Like Box plugin is deprecated. Please use the new Page Plugin instead. The Page Plugin allows you to embed a simple feed of content from a Page into your websites.

If you do not manually upgrade to the Page Plugin, your Like Box plugin implementation will automatically fall back to the Page Plugin by June 23rd 2015.


页面插件链接是 https://developers.facebook.com/docs/plugins/page-plugin

关于facebook-javascript-sdk - FB :like_box failed to resize in 45s,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23013413/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com