faceBook Canvas APP not closing FB.Connect.showPermissionDialog
- by Paresh
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?