English 中文(简体)
FB 共同市场
原标题:FB JS SDK setting iframe size to 0

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)
});
问题回答

暂无回答




相关问题
Facebook JS SDK: Check permissions before Login PopUp

I want to check permissions of a logged in user before presenting the iframe login to request extended perms, but the iframe popup gets blocked by the browser (ff, chrome tested). I want to avoid this ...

Hide content from non-fans in a Facebook *IFrame* (Not FBML)

it is incredibly easy to hide content from someone who does not like your application...if you re using FBML. I m using an iFrame and the JavaScript SDK, and am having terrible difficulty figuring ...

Identify and Remove Frame Busting Code?

I was experiencing a bug with my Facebook like buttons. The fix for the bug was posted here: http://wiki.github.com/facebook/connect-js/custom-channel-url At the beginning of this solution it ...

Sending Facebook notifications

I have a little facebook iframe application written with rails and the facebooker plugin. I can loop through the users friends and see whether they also have this application. To do this I use a fql ...

热门标签