简体   繁体   English

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

[英]fb:login_button failed to resize in 45s

在此处输入图片说明

Facebook button is not working on IE8 at starting it is coming like in screenshot and after 45 seconds it disappears automatically with error IE8启动时,Facebook按钮在IE8上不起作用,如屏幕截图所示,并在45秒后自动消失并出现错误

fb:login_button failed to resize in 45s fb:login_button在45秒内无法调整大小

2 more error getting while opening page are: 打开页面时出现的另外2个错误是:

  1. FB.init has already been called - this could indicate a problem. FB.init已被调用-这可能表示问题。
  2. The "fb-root" div has not been created, auto-creating. 尚未创建“ fb-root” div,而是自动创建。

even after refreshing the page button is not coming. 即使刷新后页面按钮也没有出现。 after deleting browser history button again shows like in attached image and on click and after entering Facebook login credentials again it is getting disappears and not working as it should. 删除浏览器历史记录后,按钮再次显示,如附件图像中所示,并单击后,再次输入Facebook登录凭据后,它消失了,无法正常工作。

following is javascript code. 以下是javascript代码。

function initialize_fb(p_config) {  
    config = p_config;
    window.fbAsyncInit = function () {
        FB.init({
            appId: config.appId,
            channelUrl: config.channelURL,
            status: true,
            cookie: true,
            xfbml: true
        });
    };
    (function (d, debug, config) {
        //console.log(config);
        var js, id = "facebook-jssdk",
            ref = d.getElementsByTagName("script")[0];
        if (d.getElementById(id)) {
            return;
        }
        js = d.createElement("script");
        js.id = id;
        js.async = true;
        js.src = "//connect.facebook.net/en_US/all" + (debug ? "/debug" : "") + ".js#xfbml.js=1&appId=" + config.appId;
        ref.parentNode.insertBefore(js, ref);
    }(document, false, config));
}
function fshowuser(p_image, p_name, p_url, p_function, p_uid) {         
    var inner_htm;  
    showUserFunction = p_function;
    if (p_name == "") {
        isModify = false;
        inner_htm = "<fb:login-button show-faces='false' width='100' max-rows='1' onlogin='{2}' id='buttonFBConnect'>{3}</fb:login-button>";
    } else {
        isModify = true;
        if(! isRemoveRequired) {
            inner_htm = "<table><tr><td rowspan='2'><img src='{0}' alt='{1}' id='fbModify'></td><td id='fbFrndName'>{1}</td></tr><tr><td><fb:login-button show-faces='false' width='100' max-rows='1' onlogin='{2}'>{4}</fb:login-button></td></tr></table>";           
        }else{
            inner_htm = "<table><tr><td rowspan='2'><img src='{0}' alt='{1}' id='fbModify'></td><td id='fbFrndName'>{1}</td></tr></table>";         
        }
        if (p_uid != undefined && p_uid != null && p_uid != "") {
                inner_htm += "<input type='hidden' name='fb_uid' id='fb_uid' value='" + p_uid + "'>";
        }
        inner_htm += "<input type='hidden' name='fb_access_token' id='fb_access_token' value='" + accessToken + "'>";       

    }   
    $("#" + config.divId).html(inner_htm.format(p_image, p_name, p_function, config.connectText, config.modifyText, config.delinkText));    
    FB.XFBML.parse(document.getElementById(config.divId));
}

and following is html tag 以下是html标签

  <html xmlns:fb="http://www.facebook.com/2008/fbml"      xmlns:og="http://opengraphprotocol.org/schema/" >

and it seems like button is not rendering correctly following is html code after button gets disappears which is not completed: 似乎按钮未正确呈现以下是按钮消失后未完成的html代码:

<iframe name="f17348a353fff43" width="100" height="1000" title="fb:login_button Facebook Social Plugin" src="https://www.facebook.com/plugins/login_button.php?login_text=Connect&show_faces=false&max_rows=1&width=100&app_id=645653312120915&locale=en_US&sdk=joey&channel=https%3A%2F%2Fs-static.ak.facebook.com%2Fconnect%2Fxd_arbiter.php%3Fversion%3D25%23cb%3Df257016bf55bb8c%26origin%3Dhttps%253A%252F%252Flocalhost%253A7003%252Ffda8d5ab9fe0b6%26domain%3Dlocalhost%26relation%3Dparent.parent" frameBorder="0" scrolling="no" style="border-bottom: medium none; border-left: medium none; visibility: visible; border-top: medium none; border-right: medium none;" allowTransparency="allowtransparency">

I have tried to Google allot but nothing is working. 我曾尝试向Google分配,但没有任何效果。 code is working fine in Google chrome and Firefox browsers. 代码在Google chrome和Firefox浏览器中正常运行。 so anybody knows solution? 所以有人知道解决方案吗?

Matt Bower from Facebook developer's forum gave this temporary solution: 来自Facebook开发者论坛的Matt Bower提供了此临时解决方案:

#fb_login_button { 
    width: 80px; 
}
#fb_login_button span, 
#fb_login_button iframe {.
    width: 80px! important;
    height: 25px! important;
}

Facebook Dev's are working to fix this error. Facebook开发人员正在努力修复此错误。

I encountered the same issue. 我遇到了同样的问题。 I had conflicting CSS selectors. 我有冲突的CSS选择器。

I had to change: 我不得不改变:

class="menu-icon"

to

class="mysite-menu-icon"

I recommend going through all your class and id attributes and test any common names you see. 我建议您遍历所有的classid属性,并测试您看到的所有常用名称。 Note that you need to test the HTML attributes not your CSS selectors. 请注意,您需要测试HTML属性而不是CSS选择器。

I have the same problem, 我也有同样的问题,

fb:like_box failed to resize in 45s fb:like_box无法在45秒内调整大小

I have fixed this problem temporary 我已临时修复此问题

Please add this CSS, 请添加此CSS,

.fb-like-box iframe{width:250px !important;height:200px !important;} .fb-like-box iframe {width:250px!important; height:200px!important;}

i hope this will help. 我希望这将有所帮助。

If this is happening in Chrome, disable all of your extensions, even the ones that could not possibly be the problem. 如果是在Chrome中发生这种情况,请禁用所有扩展程序,即使那些可能不是问题的扩展程序也是如此。 Reload the page and see if that resolved it. 重新加载页面,看看是否可以解决它。

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

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