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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T01:36:33+00:00 2026-05-22T01:36:33+00:00

I have used a fb script to increase a size of canvas. Here is

  • 0

I have used a fb script to increase a size of canvas. Here is the code..

<div id="fb-root"></div>

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

    (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>

<script src="http://ajax.microsoft.com/ajax/jquery/jquery-1.4.2.min.js" type="text/javascript"></script>

It is working in all browsers I’ve tested except IE8. In fact also working in IE9 but not working in IE8.

Please suggest me to solve the issue.

Thanks

  • 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-22T01:36:34+00:00Added an answer on May 22, 2026 at 1:36 am

    This is what I use for extending the size of my canvas and it works in all browsers:

    <script type="text/javascript" src="http://static.ak.connect.facebook.com/js/api_lib/v0.4/FeatureLoader.js.php"></script>
    <script type="text/javascript">
        FB_RequireFeatures(["CanvasUtil"], function()
        {
          FB.XdComm.Server.init("/xd_receiver.htm?v=2");
          FB.CanvasClient.startTimerToSizeToContent();
        });
        function onWindowResized(info)
        {
          var canvasInfoDiv = document.getElementById("CanvasInfo");
          var text = String.format("window ({0}, {1}), page ({2}, {3}), canvas({4}, {5}), scrollPos({6}, {7}), canvasPos({8}, {9})", 
            info.window.w, info.window.h,info.page.w, info.page.h,
            info.canvas.w, info.canvas.h,
            info.scrollPos.x, info.scrollPos.y,
            info.canvasPos.x, info.canvasPos.y);
          canvasInfoDiv.innerHTML = text;
        }
    </script>
    

    You need to have the xd_receiver.htm inside of a publicly accessibly directory as well. Here is the contents of that file:

    xd_receiver.htm

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
       "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" >
    <head>
        <title>cross domain receiver page</title>
    </head>
    <body>
        <script src="http://static.ak.facebook.com/js/api_lib/v0.4/XdCommReceiver.js?2" type="text/javascript"></script>
    </body>
    </html>
    

    EDIT:

    $(document).ready(function(){
      FB.init({appId:'your-app-id', status:true, cookie:true, xfbml:true});
      $(window).load(function(){
        FB.Canvas.setSize({height:1100});
      });
    });
    

    Obviously set the height to whatever the height of your content is. Before I had:

    FB.Canvas.setSize({height:$('html').height()});
    

    But IE seems to not like that. Shouldn’t have to explicitly set the height #, but had to in this case.

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

Sidebar

Related Questions

I have used this header in my site: <head> <script type=text/javascript src=libs/jquery.js></script> <script type=text/javascript
I have used the script at: http://www.javascript-coder.com/ i use the following jquery code in
i have used the login script which is found here http://www.phpeasystep.com/phptu/6.html the script works
I have used a jQuery script and some php code to generate two select
I have used this code on an autosuggest script to split the CSV created
i have something similar to the following... used a python script to JSON to
i have used following code to repeat a process creation/close iteratively dim vProcessInfo as
I have used this script which i found in the official simple html dom
I have used a particular script for renaming the picture the if the file
I am creating a sign up script, in the past i have used a

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.