Search code examples
facebookfbmlfbjs

fbml on a page tab


I'm building an app for a client. I'd love to have the iframe on the client's page tab, but that seems very hard to do at this point. Instead, I'm happy to have a link to a canvas app where I can do what I want. The problem is that I have an extra step that I don't like.

Users start here (will be on client page) It's just a static image link to this page--> http://apps.facebook.com/test-site/

Where they see the same Join button, that, when clicked, prompts the user for permissions.

I hate having this extra step.

Does anyone know of a way to request permissions for this app on that page tab?

I tried using fbjs on this page, but you can see that when you request the permissions, it's requesting permissions on behalf of the tab app. I can't figure out how to set the appid for this....

<div style="float:left; 
    background:url(http://webhooks.digitas.com/Static/images/FB_activate_state1.jpg)
    no-repeat; width:520px; height:419px">
    <div style="float:left; width:520px; padding-top:205px">
        <form name="form" id="form" method="POST" onsubmit="showPermissions(); return false;">
            <div style="width:520px;float:left; padding-top:2px">
            </div>
            <div style="float:left; padding-left:70px; padding-top:10px">
                <input type="image" src="http://webhooks.digitas.com/Static/images/join_off.jpg" 
                value="Submit" /></div>
            </form>
        </div>
    </div>
<script> 
<!--
function showPermissions(){
    Facebook.showPermissionDialog("offline_access", "ondone"); 
}
function ondone(){
    new Dialog().showMessage("Message", "Ajax Error", "Ok");
}
//--> 
</script>

Solution

  • are you completely set on having the dialog permissions? if not, on the tab page, you can have it link to the canvas app with a full page permissions grant.