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 6247895
In Process

The Archive Base Latest Questions

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

I have a facebook app which run only through a fan page. Go to

  • 0

I have a facebook app which run only through a fan page.
Go to app : http://apps.facebook.com/imageassistant/ (You should have a fan page to check this)

I need to increase the height of my canvas page as much as I can with a fix width value(If you run my application you will see)

I have a index.php file which include fbmain.php file

//index.php
<?php
 include_once "fbmain.php"; // this file do all authentication parts
//some codes
?>  

I need to resize my all pages in my app
I found some codes related to this from facebook developer page

window.fbAsyncInit = function() {
  FB.Canvas.setSize();
}

// Do things that will sometimes call sizeChangeCallback()

function sizeChangeCallback() {
  FB.Canvas.setSize();
}

and this

FB.Canvas.setSize({ width: 640, height: 480 }); // Live in the past

But I don’t know how to use these codes in my app and where should I put those?
Do I have put this code in each and every file in my app?
Do I have to change the app settings in my developer app page also? (IFrame Size to Show scrollbars or Auto-resize before do this)
Can anyone please post the complete answer including where should I put that?
Note : I am using php sdk

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

    But I don’t know how to use these codes in my app and where should I put those?

    There are a number of valid ways of doing this the following is just one:

    <!doctype html>
    <html xmlns:fb="http://www.facebook.com/2008/fbml">
        <head>
            <!-- YOUR HEADER CONTENT -->
        </head>
        <body>
            <div id="fb-root"></div>
    
            <!-- You Page Content HERE -->
    
            <script>
              window.fbAsyncInit = function() {
                FB.init({appId: 'your app id', status: true, cookie: true, xfbml: true});
                FB.Canvas.setSize();
              };
              (function() {
                var e = document.createElement('script'); e.async = true;
                e.src = document.location.protocol +
                  '//connect.facebook.net/en_US/all.js';
                document.getElementById('fb-root').appendChild(e);
              }());
            </script>
        </body>
    </html>
    

    Do I have put this code in each and every file in my app?

    If you want the iFrame to resize then you need to include this kind of code in each and every page.

    Do I have to change the app settings in my developer app page also?

    For this to work you need to select the auto-resize option in the developer app.


    You man also want to consider FB.Canvas.setAutoResize if your content’s size is dynamic.

    You also may come accross issues where FB.Canvas.setSize fires too early in which case you can use setTimeout to delay it – from experience I’ve found 200ms to be about optimal:

              window.fbAsyncInit = function() {
                FB.init({appId: 'your app id', status: true, cookie: true, xfbml: true});
                window.setTimeout(
                    function() {
                        FB.Canvas.setAutoResize();
                    },
                    200
                );
              };
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have created a Facebook app, added it to a Facebook Fan page and
I have a Facebook app ID which I'm using on 6 iOS apps for
I have a mobile app, which is pretty data driven, though only through text
I have a Facebook app which loops forever when run in IE. In other
I have created a new Facebook app. Whenever I visit the canvas page (https://apps.fac...)
I have a FaceBook app in which I use the apprequests API to invite
I have an open-source app which uploads photos to Facebook. To save bandwidth, the
I have an app where users can sign up with Facebook, in which case
I have a Facebook App & a Facebook Page (with Facebook Timeline enabled). The
I have created a Facebook App and a Facebook Page for a company. What

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.