views:

32

answers:

1

Hi,

I'm a little stuck at the moment. I'm trying to figure out how to ask for permissions before a user access 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?

A: 

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.

Sarfraz

related questions