0

I followed the info from this post : here to load the JS SDK into my page.

Here is the page : https://www.tkwk.be/client/babyboom/www/

It works great (SSL connection is valid) until I use the SDK.

The problem is that when I try to use the function setAutoGrow() just before my /head I got an error.

<script type="text/javascript"> 
  window.fbAsyncInit = function() {
    FB.Canvas.setAutoGrow();
  } 
</script>

The page at about:blank displayed insecure content from http://static.ak.facebook.com/connect/canvas_proxy.php?version=3#behavior=p&method=setSize&params=%7B%22height%22%3A892%2C%22width%22%3A1630%2C%22frame%22%3A%22iframe_canvas%22%7D.

However I did load the JS SDK with https like this :

<div id="fb-root"></div><script src="https://connect.facebook.net/en_US/all.js"></script>
<script>
FB._https = true;
FB._https = (window.location.protocol == "https:");
   FB.init({
        appId : 'XXXXXXXXXXX',
        status : true, // check login status
        cookie : true, // enable cookies to allow the server to access the session
        xfbml : true // parse XFBML
    });
</script>

I would like to understand where I made a mistake.

Thanks in advance for your time.

Community
  • 1
  • 1
Jk_
  • 1,418
  • 2
  • 11
  • 24
  • 1
    try removing the protocol from the URL of the `all.js` file. ie: make it a [protocol relative URL](http://paulirish.com/2010/the-protocol-relative-url/) - `src="//connect.facebook.net/en_US/all.js"` – Lix Jan 28 '12 at 11:50
  • 1
    I got the same problem : https://www.tkwk.be/client/babyboom/www/ – Jk_ Jan 28 '12 at 12:00
  • 1
    Why do you need to use the `FB.Canvas.setAutoGrow()` method if you are not in a Facebook iFrame? – Lix Jan 28 '12 at 12:02
  • It allows me the resize the size of the iframe on the fly. This website is used as a facebook fanpage : http://www.facebook/salonbabyboom – Jk_ Jan 28 '12 at 12:29
  • Then you are going to want to test it inside Facebook. Until then I recommend you comment out all code that is directly related to your application being inside a Facebook iFrame... – Lix Jan 28 '12 at 12:31
  • Why ? I tested it inside facebook. – Jk_ Jan 28 '12 at 12:38
  • You are asking a question about an error that was raised by code that you dont need when you are not inside an iFrame. There is no need to deal with this as it is a problem what will only exist in your test environment. Take the code into a Facebook iFrame- show that the error still exists and then we can help more. For now its senseless to worry about it. – Lix Jan 28 '12 at 12:49
  • You right ! I didn't look into the FB iframe and now the error is gone. My bad, thanks for your time and patience. – Jk_ Jan 28 '12 at 12:53
  • no problem friend :P happy coding! – Lix Jan 28 '12 at 12:55

0 Answers0