Page Tab Resize Code Updated in Facebook Tab Manager 3.3

The latest release of Facebook Tab Manager alters the JavaScript code generated to resize page tabs. I’ve been getting intermittent reports of users tabs not resizing correctly for the last few weeks, apparently because Facebook is phasing out support for the code I have been using.

The new version makes it necessary to specify the App ID assigned by Facebook as part of the object initialization process in JavaScript. That means you must either record the App ID in Facebook Tab Manager or pass that ID as part of the URL you register with Facebook (?appid=123456789).

The code that is generated looks like this:


<script type="text/javascript" src="<a target="_blank" href="https://connect.facebook.net/en_US/all.js">https://connect.facebook.net/en_US/all.js</a>"></script> <script type="text/javascript" charset="utf-8">
FB.init({
appId : '[APP ID HERE]',
channelUrl : 'https://www.carrcommunications.com/wp-content/plugins/facebook-tab-manager/channel.php',
status : true,
cookie : true,
xfbml : true
});
window.onload = function() {
FB.Canvas.setAutoGrow();
}
</script>

The channelUrl parameter will point to a file on your own domain. This supposedly solves some cross-domain scripting issues with browsers.

Recording the App ID in Facebook is now part of the routine process of adding your tab to a specific page.

For existing tabs and reveal tabs, it may be easier to pass the information about the app ID to Facebook Tab Manager through a query string. For example, if you have a reveal tab registered as http://www.example.com/fbtab/?fbreveal=1142-1415&resize=1 you can add appid= to the end as in http://www.example.com/fbtab/?fbreveal=1142-1415&resize=1&appid=1234586

The Reveal Tab Setup utility will now insert that parameter into the string when you record the app ID there, but if you’re trying to retrofit existing content, it may be easier to make the change in the developer tool. That’s where you’ll have to go to look up the app ID anyway.

Note: I am still seeing some issues with this code not working in Firefox.

The 3.3.1 update tweaks the code for compatibility with Firefox.

  • Colin

    Thanks. Using this in the header of the main FB template works great. However as I can only pass one ID it is limiting. Is it possible to dynamically retrieve the relevant Application ID which is saved in WP whenever a new tab is loaded?

  • Mat_

    Looks like I still have problems with scroller with page tabs on Firefox (exemple : https://www.facebook.com/AgenceKrisis/app_119477631580555)
    Any idea please ?