English 中文(简体)
定 义 2. 自行车长度
原标题:setAutoGrow to set canvas length
  • 时间:2011-11-10 07:14:45
  •  标签:
  • facebook

我正试图用流利的花招来做我的面像。 我正在使用文字

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

just after i initialize my app but it is still set to 800px. How should i use this function?

问题回答

或许为了帮助他人,试图从你的法典中删除https或https。 这里的地雷(波拉线):

    <div id="fb-root"></div>
    <script type="text/javascript" src="//connect.facebook.net/en_US/all.js"></script> 
    <script type="text/javascript">
    window.fbAsyncInit = function() {
      FB.init({
        appId      :  YOUR_APP_ID , // App ID
        channelUrl :  //WWW.YOURURL.COM/FOLDER , // Channel File    
        status: true, 
        cookie: true, 
        xfbml: true
      });
      FB.Canvas.setAutoGrow();
    }
    </script>

在我删除了http/https之后,它就在所有浏览器上工作。

</one> tag之前,我写了以下代码。

<div id="fb-root"></div>
<script type="text/javascript">
            window.fbAsyncInit = function() {
                FB.init({
                    appId:  <?php echo YOUR_APP_ID ?> ,
                    cookie: true,
                    xfbml: true,
                    oauth: true
                });
                FB.Canvas.setAutoGrow(true);
            };
            (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>

这对我来说是很不错的。

在高级应用环境中,<代码>八<>/代码>为<代码>六或氟。

没有在我的申请中工作,但我发现我错过了<代码><div id=“fb-root”></div>。 我刚刚把它放在<代码>和t;字母类型=“text/javascript”>上,并解决问题。

Try with following.It will auto resize your iframe.

<html>
<head>
<script src="./includes/js/jquery.min.js"></script>
<script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script>
<script type="text/javascript">

window.fbAsyncInit = function(){
FB.init({appId:  appid , status: true, cookie: true, xfbml: true});
FB.Canvas.setAutoResize();};
function setSize(){
FB.Canvas.setAutoResize();}

</script>
</head>
<body style="overflow: hidden" onload="setSize()">




相关问题
Facebook Connect login dialog not working

I am using Facebook Connect for iPhone and following the official instructions. I use the following code to display the login dialog: FBLoginDialog* dialog = [[[FBLoginDialog alloc] initWithSession:...

Facebook App Profile Tab is Empty ... No Content Displayed?

I can view my application via the http://apps.facebook.com/myapplication/ link and the content shows up correctly. I also added the application as a tab to a facebook page. However, when viewing the ...

Facebook Platform error: "Object cannot be liked"

I m working on a Facebook Application that generates wall posts. In testing these posts, I ve discovered that the Facebook Platform action of "liking" a post is failing. The specific error message ...

how to call showPermissionsDialog() in php (facebook api)?

I was reading over the documentation yet I could not figure out how to call Facebook.showPermissionsDialog() in php include_once ./facebook-platform/php/facebook.php ; $facebook = new Facebook(my ...

Facebook connect

If I plug in the facebook connect into my website, How can I prevent double signups? Lets say I have a user that s already signed up to my site but he clicked the connect with facebook, is there a ...

热门标签