小编Eug*_*ria的帖子

fb:like_box无法在45秒内调整大小

有没有任何可行的解决方案来阻止Facebook Like Box不打破他的容器或其他东西?已将异步设置为TRUE但仍然可以退出.正如我在stackoverflow上看到的那样,只有fb:login_button存在问题,但是我收到了与控制台相同的警告:

fb:like_box failed to resize in 45s
Run Code Online (Sandbox Code Playgroud)

总而言之,这是我的代码,也许我错过了一些东西.

HTML标记

<html lang="en" xmlns:fb="http://ogp.me/ns/fb#">
Run Code Online (Sandbox Code Playgroud)

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, …
Run Code Online (Sandbox Code Playgroud)

facebook-javascript-sdk facebook-likebox

6
推荐指数
1
解决办法
1216
查看次数