开发者

FB JS SDK setting iframe size to 0

开发者 https://www.devze.com 2023-03-31 18:05 出处:网络
Our FB App was working fine then suddenly today we noticed that FB.setSize() is setting 开发者_StackOverflowheight to 0px! Did FB break something or the behavior of FB.setSize() has suddenly been chan

Our FB App was working fine then suddenly today we noticed that FB.setSize() is setting 开发者_StackOverflowheight to 0px! Did FB break something or the behavior of FB.setSize() has suddenly been changed.

App Url: https://apps.facebook.com/memorablestatus/

Update:-

You will now find that the above url is working fine, since I have modified my JS to call setSize with explicit width and height.


Yeah I had the same problem today, they have updated the js sdk and now the height is not correct, since I can't predict the correct height of my page I use jquery to do it, and since some things are delayed and loaded after a few seconds, I use a timeout :

FB.Array.forEach([300, 600, 1000, 2000], function(delay) {
  setTimeout(function() {
    FB.Canvas.setSize({height: $(document).height()});
  }, delay)
});
0

精彩评论

暂无评论...
验证码 换一张
取 消