Extended Permissions popup

Aug 26, 2009 at 6:53 PM

I have a question in respect to the extended permissions.  I am able to get the "Grant Permission" link working, however, what I really want is when a user initally comes to the app, I want to check if they have the extended permissions (which can be accomplished with the API), and if they don't, I want the pop-up to automatically show without them having to click on a link.

Has anyone does this?  Sample code will be great.  Thanks in advance.

Here is what I have right now.  Basically I hide or show the option to add or revoke the permission depending on if the user currently has it or not.  I would like to instantly show the pop-up prompt instead of a link:

<div id="divExtendedPerms" runat="server">
        <fb:prompt-permission perms="publish_stream">
            Grant permission for status updates
        <br />
<div id="divRevokeExtendedPerms" runat="server">
     Click <asp:LinkButton ID="lnkRevokeExtendedPerm" runat="server" Text="here" OnClick="lnkRevokeExtendedPerm_Click" /> to revoke publishing permissions.
        <br />

//Check if user has granted app publishing permissions
divExtendedPerms.Visible = !Master.API.users.hasAppPermission(Enums.Extended_Permissions.publish_stream);

divRevokeExtendedPerms.Visible = Master.API.users.hasAppPermission(Enums.Extended_Permissions.publish_stream);

protected void lnkRevokeExtendedPerm_Click(object sender, EventArgs e)
Aug 31, 2009 at 8:37 PM

Any ideas on this topic from anyone?