You must be Connected before you can add a profile tab. Prompting the user before this will result in an error. Click the Login button on the top left to connect if you’re not already connected.
<div>
You must be Connected before you can add a profile tab. Prompting the user
before this will result in an error. Click the Login button on the top left
to connect if you're not already connected.
</div>
<h1>Defaults</h1>
<fb:add-profile-tab></fb:add-profile-tab>
<h1>Inline event handler</h1>
<fb:add-profile-tab onadd="inlineHandler()"></fb:add-profile-tab>
<script>
// this will fire when the profile tab is added from the second tag
window.inlineHandler = function() {
Log.info('User added profile tab (inline handler)');
};
</script>
Sources: http://fbrell.com/xfbml/fb:add-profile-tab