Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6665629
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T02:44:35+00:00 2026-05-26T02:44:35+00:00

I have an app that uses the Javascript SDK and the height is being

  • 0

I have an app that uses the Javascript SDK and the height is being determined initally through FB.Canvas.setSize();. This is working correctly:

<div id="fb-root"></div>
<script>
              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);
              }());
            </script>

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 FB.Canvas.setAutoGrow(); with various parameters passed through it, but it would give me a refresh loop and expand the height by a little but each time.

So my question is, how do I get the setAutoGrow 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.

Thanks again in advance!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T02:44:36+00:00Added an answer on May 26, 2026 at 2:44 am

    Refer to this page:

    https://developers.facebook.com/docs/reference/javascript/FB.Canvas.setAutoGrow/

    “This function is useful if you know your content will change size, but you don’t know when. There will be a slight delay, so if you know when your content changes size, you should call setSize yourself (and save your user’s CPU cycles).”

    So, if you have some javascript functions that increase the height you can call the setSize method, otherwise setAutoGrow and specify a longer or shorter interval

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a mobile web application that uses the Javascript SDK to connect to
I have a web app that is completely contolled with javascript. This means there
I have Phonegap's Facebook plugin working perfectly within my Android app. This plugin uses
I have an app that uses Javascript to perform some calculations and then plot
We have an app that uses simple one way binding with a GridView to
I have an app that uses EF. To test my stuff I generally wrap
I have an app that uses the python/c api and I was wondering what
I have an app that uses a tableview, along with a UIButton that I
I have a App that uses the In App feature. -(void) completeTransaction: (skPaymenttransaction *)transaction{
I have an app that uses the iPhone camera and puts an overlay over

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.