Asking for Permissions before user accesses application
I'm a little stuck at the moment. I'm trying to figure out how to ask for permissions before a user a开发者_StackOverflowccess the application.
I know how to ask for permissions upon a click, but I'd like to do the same as what Zynga do so when a user goes to apps.facebook.com/myapp the first thing it will do is ask for permissions.
How can I do that?
You can prompty them for that like this:
$facebook = new facebook(API, SECRET);
$facebook->require_login(required_permissions='email');
You should put that line right after you are creating the object of facebook.
精彩评论