views:

122

answers:

2

Hi all,

I am developing a small facebook application. In my application I need offline_access and email permission. I've been succesfully prompting the user for permission using

FB.Connect.showPermissionDialog("email,offline_access");

But what I really want to do is prompt the user with a require permission dialog, not request.

Does anyone know how to do that in javascript?

Thank you very much!

A: 

Just deny his access if he doesn't accept it.

M28
+2  A: 

Try something like this:

FB.Connect.showPermissionDialog("email,offline_access", function(perms) {
   if (!perms) {
     document.location.href='YouNeedToAuthorize.html';
   } else {
     document.location.href='homePage.html';
   }
 });
Faruz