Fredy31
Fredy31

Reputation: 2817

Define custom height for tab of Facebook application with iFrame

In the advanced options of my app, I put Canvas Height at Fluid or Fixed at [any value]px and my iFrame is always still locked at 800px.

What am I doing wrong? I have no code inside my page that dictate a height for the canvas.

Upvotes: 1

Views: 1900

Answers (1)

Deradon
Deradon

Reputation: 1787

You might need to call a JS function from the FB-JS_SDK:

window.fbAsyncInit = function() {
  FB.init({
    appId      : 'YOUR_APP_ID', // App ID
    channelUrl : '//WWW.YOUR_DOMAIN.COM/channel.html', // Channel File
  });
  FB.Canvas.setAutoGrow();
}

More to read here: http://developers.facebook.com/docs/reference/javascript/FB.Canvas.setAutoGrow/

edit:

NOTE: "Note: this method is only enabled when Canvas Height is set to "Fixed at (800)px" in the Developer App."

Upvotes: 1

Related Questions