Problem prompting user for extended permissions using showPermissionDialog in FB page tab

Posted by snipe on Stack Overflow See other posts from Stack Overflow or by snipe
Published on 2010-05-13T04:45:31Z Indexed on 2010/05/13 4:54 UTC
Read the original article Hit count: 198

Filed under:
|

I have an FBML app that will use the tab as a promo tab before the full app goes live. The purpose of the promo tab is to allow users to opt in to email notifications (using the FB API sendNotifications call), so I need to prompt them to allow the app and grant extended permissions on that promo tab.

The tab code is:

<?php
require_once 'config.php';
?>
<form id="form1">
<h1>
<a href="#" clickrewriteform="form1" 
clickrewriteurl="http://www.mydomain.com/fanpageajax/result.php" 
clickrewriteid="allowapp">Step 1. Allow the Application</a>
</h1>
<div id="allowapp"></div>
</form>

<h1><a onclick="Facebook.showPermissionDialog('email');return false;">
Step 2. Grant extended permissions (intab)</a></h1>

The result.php page just tags the API to ensure the allow prompt will show up.

The problem is with the Step 2.

Once the user has allowed the app, and they click on the Step 2, nothing happens. If they click on it twice, THEN the extended permissions dialog box popups up, but it asks them to grant extended permissions TWICE.

OR....

If the user clicks on Step 1, and allows the app, and then reloads the fan page tab, they only have to click on the Step 2 link once, and the permissions show up.

Anyone have any ideas? I have been beating myself in the head over this for hours.

© Stack Overflow or respective owner

Related posts about fbml

Related posts about facebook