12/25/2024 11:11:53

问题描述

Facebook登录时会传入权限,用户可以反选这些权限。但是再次登录时,无法反选。

图片描述

图片描述

问题原因

Facebook平台侧策略。

解决方案

1、上述现象符合Facebook官方指引。

Use FBSDKLoginManager to request additional permissions or request previously declined permissions using the logInWith*:

methods. FBSDKLoginManager will see it's a re-request by the availability of [FBSDKAccessToken currentAcccessToken].

https://developers.facebook.com/docs/facebook-login/ios/permissions#permissions-requesting

2、若想避免,当前有效解决方案如下。

业务侧当前如果只传入了Facebook的user_Friends权限,则用户取消授权之后,就不要再转入user_friends权限了。如果想要传入,按Facebook的最佳实践,应该弹窗告知用户,用户确认之后再传入。

“Ask for permissions in context and explain why”

https://developers.facebook.com/docs/facebook-login/best-practices

TODO: do not request permissions again immediately. Consider providing a NUX

describing why the app want this permission.

https://developers.facebook.com/docs/facebook-login/ios/permissions#permissions-declining



Copyright © 2024 MSDK.
All rights reserved.

results matching ""

    No results matching ""