简体   繁体   中英

Where should I specify what Facebook permissions to request in iOS app with the new enhanced auth dialog?

Before the new enhanced auth dialog, this was the way to ask for permissions in an iOS app:

NSArray *permissions = [[NSArray alloc] initWithObjects:
        @"user_likes", 
        @"read_stream",
        nil];
[facebook authorize:permissions];
[permissions release];

What should I do if I switch to the enhanced dialog? Should I just choose the permissions to ask for in the Facebook "Edit App" page and pass "nil" instead of an array?

[facebook authorize:nil];

I tried specifying permissions in the "Edit App" page but my app's authentication dialog seems to completely ignore them. It still seems to only mention the ones specified in code, inside the "permissions" array.

Is there a way to have my app use the permissions specified in the "App Edit" page instead of having to write them in code?

Do it the same way you were before; the settings you're thinking of in the Developer App are for Authenticated Referrals (which causes links on Facebook to your canvas app to pop an auth dialog when clicked instead of going to the app and having you redirect to the auth dialog yourself)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM