faceBook Canvas APP not closing FB.Connect.showPermissionDialog

Posted by Paresh on Stack Overflow See other posts from Stack Overflow or by Paresh
Published on 2010-01-24T15:47:48Z Indexed on 2010/05/03 14:38 UTC
Read the original article Hit count: 491

Filed under:

My FB application is using the below code to generate the FB.Connect.showPermissionDialog box.

<?php if($fb->api_client->users_hasAppPermission("publish_stream",$fb_user)==0)
{ ?> 
<script>  
FB.ensureInit(function(){

FB.Connect.showPermissionDialog("publish_stream", function() {
 },false,266167740665);

});
 </script> 
<?php } ?>

The php if statement is for a check if the user has granted this permission previously or not. It is working fine and if the user hasn't granted permission before then FB.Connect.showPermissionDialog is displayed, which prompts for the permission. My problem is that on "Granting" or "Skipping" the permission by the user the dialog box doesn't go away. It resides over there and refreshes itself to open the facebook home page inside the box. It has to be forcefully closed by clicking on the X button. Am I doing any thing wrong?

© Stack Overflow or respective owner

Related posts about facebook-api