简体   繁体   中英

Android: Facebook: How to ask user for required permission

According to Facebook login steps policy (to get the application approved), do I have to show the user a dialog (with yes and no buttons) explaining the required permission (ex: user_likes) or I can just call

LoginManager.getInstance().logInWithReadPermissions(...) 

which will open the Facebook grant permission dialog with required permission(s)?

Same thing, when user opens my app and select a feature that requires to log in, do I call directly

LoginManager.getInstance().logInWithReadPermissions(public_profile) 

or do I have to show a confirmation dialog first?

在此处输入图片说明

You are not required to create your own custom dialog to display to the user when they are signing in with Facebook or using a feature which requires Facebook permission. Facebook will automatically prompt the user to accept the set permissions when they originally log in if you are using

LoginManager.getInstance().logInWithReadPermissions(...) 

If you want to add custom dialogs to alert the user that is okay, however I think this may make the app more tedious to use.

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