Topic-icon page tab autogrow not working

Active Subscriptions:

None
11 years 2 months ago #52161 by flobau
Hello,
the autogrow on page tab isn't working on this page: www.facebook.com/kussmund.wien/app_1623782587853413 width jfbc. Now jfcb is deactivated and this code is inserted directly in the template:
<div id="fb-root"></div>
<script>
window.fbAsyncInit = function() {
FB.init({
appId : '1623782587853413',
status : true,
xfbml : true
});
FB.Canvas.setAutoGrow();
};
(function(d, s, id){
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) {return;}
js = d.createElement(s); js.id = id;
js.src = "//connect.facebook.net/en_US/all.js";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));

</script>

the scrollbars are gone. But If I delete this code and activate jfcb, the scrollbars are here. Why?
The topic has been locked.
Support Specialist
11 years 2 months ago #52168 by alzander
First, you're using the very, very old all.js Javascript library. That's been replaced by Facebook with their newer sdk.js library which JFBConnect uses. I don't think that's the cause, but it's something I'd fix.

Beyond that, the only things I see different in your code is that we have a timeout setup to call the AutoGrow. You can see that code in the /components/com_jfbconnect/libraries/provider/facebook.php around line 360:
$resizeCode = "window.setTimeout(function() {\n" .
                    "  FB.Canvas.setAutoGrow();\n" .
                    "}, 250);";
Try to update that to:
$resizeCode = "FB.Canvas.setAutoGrow();";
If that doesn't work, also try setting the "Always Parse Tags" setting in the JFBConnect Configuration area to Yes.

Let us know how the above goes, and hopefully that gets you working.

Thanks,
Alex
The topic has been locked.