views:

64

answers:

0

I've created a facebook connect application, iframe. I'm using it under apps.facebook.com/app-name.

It seems that after a refresh, the setSize() method simply fails. sometimes works, sometimes doesn't... (under latest Firefox and IE) is there a solution for that? would you recommend using the old API instead?

testcase:

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:fb="http://www.facebook.com/2008/fbml"&gt;
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<title>test</title>
<meta name="description" content="test">
</head>
<body>
<div id="fb-root"></div>

<script type="text/javascript">
window.fbAsyncInit = function() {
  FB.init({appId: 'XXXXXXXXX', status: true, cookie: true, xfbml: true});
  FB.Canvas.setSize({ width:760,height:3000 });
};

(function() {
  var e = document.createElement('script');
  e.type = 'text/javascript';
  e.src = document.location.protocol +
    '//connect.facebook.net/en_US/all.js';
  e.async = true;
  document.getElementById('fb-root').appendChild(e);
}());

</script>

<div style="height:2000px;background:blue;width:760px;">
</div>

</body>
</html>