質問

Our FB App was working fine then suddenly today we noticed that FB.setSize() is setting height 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)
});
ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top