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

  • SEARCH
  • Home
  • 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 6554147
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T12:39:57+00:00 2026-05-25T12:39:57+00:00

From my research it seems as if this is a re-occuring problem. I’m using

  • 0

From my research it seems as if this is a re-occuring problem. I’m using the following code to resize the iframe, it currently works… that is it resizes the iframe to fit larger content, however it won’t shrink back again!

<div id="fb-root"></div>
<script>
  window.fbAsyncInit = function() {
    /* Init fb Resize window */
    FB.Canvas.setAutoResize(7);
    FB.init({
        appId:'<?php echo Yii::app()->params['fbAppId']; ?>',
            status: true,
            cookie: true,
            xfbml: true
    });
  };
</script>   

The code is positioned at the very end of the html file, before the closing body tag.

  • 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-25T12:39:57+00:00Added an answer on May 25, 2026 at 12:39 pm

    It is not logical to call FB.Canvas.setAutoResize(7); before you call FB.init()

    Also you should not call FB.Canvas.setAutoResize(7); in window.fbAsyncInit

    Here is a proper example

    window.fbAsyncInit = function() {
        FB.init({
            appId  : js_fb_app_id,
            status : true, // check login status
            cookie : true, // enable cookies to allow the server to access the session
            xfbml  : true,  // parse XFBML
            oauth   : true          
        });
    };
    $(document).ready(function(){
        FB.Canvas.setAutoResize();
    });
    

    Using jQuery. This way you can be sure that the page is resized when DOM is loaded, not before that. This way you can place your code anywhere on the page.

    You set FB.Canvas.setAutoResize to 700 ms. Do you have any particular reason to do so ? The default value is 100ms

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

Sidebar

Related Questions

From research on Stack Overflow and other sites I'm 99% sure that the problem
I believe (from some research reading) that counting down in for-loops is actually more
I've done some research on using tags from social bookmarking sites for web search
after doing some research it seems that AppDomains are not really a tool for
from my research it looks like there are basically 3 options. 1: Using COM
It seems that this question gets asked frequently , but I am not coming
I’m looking at creating a P2P system. During initial research, I’m reading from Peer-to-Peer
From time to time I see an enum like the following: [Flags] public enum
I'm having a never-ending problem with trying to call a stored procedure from a
We need to log the client's IP address from a Seam action. Currently, we're

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.