title: Facebook App iFrame - Using FB.Canvas.setSize(); and FB.Canvas.setAutoGrow();
body: <p>I have an app that uses the Javascript SDK and the height is being determined initally through <code>FB.Canvas.setSize();</code>.  This is working correctly:</p>
  
  <pre><code>&lt;div id="fb-root"&gt;&lt;/div&gt;
  &lt;script&gt;
                window.fbAsyncInit = function() {
                  FB.init({
                    appId  : '223615011031939',
                    status : true, // check login status
                    cookie : true, // enable cookies to allow the server to access the session
                    xfbml  : true,  // parse XFBML
                    // channelUrl  : 'http://www.yourdomain.com/channel.html', // Custom Channel URL
                    oauth : true //enables OAuth 2.0
                  });
  
                  FB.Canvas.setSize();
  
                };
  
                (function() {
                  var e = document.createElement('script');
                  e.src = document.location.protocol + '//connect.facebook.net/en_US/all.js';
                  e.async = true;
                  document.getElementById('fb-root').appendChild(e);
                }());
              &lt;/script&gt;
  </code></pre>
  
  <p>But say there is content on the page that would expand, making the height larger than the set iFrame size after init.  I tried using <code>FB.Canvas.setAutoGrow();</code> with various parameters passed through it, but it would give me a refresh loop and expand the height by a little but each time.</p>
  
  <p>So my question is, how do I get the <code>setAutoGrow</code> function to work apporpriately, resizing the iFrame only when the content grows and not at set intervals?  If it only can be on set intervals, only refresh when the content actually grows.</p>
  
  <p>Thanks again in advance!</p>