Facebook的统一SDK,如何强制使用登录的WebView而不是FB应用 [英] Facebook Unity SDK, how to force login using webview instead of FB App
问题描述
默认情况下,FB统一SDK会尝试使用FB应用,如果用户安装它来登录。否则,将回退到使用基于HTML弹出窗口让用户登录。
By default, the FB Unity SDK will try to use the FB App to login if the user has it installed. Otherwise, it will fall back to using a HTML based popup to let the user login.
然而,FB程序只适用于API 1.0(basic_info权限)。
将失败,并在public_profile无效的权限。
However the FB App only works with API 1.0 ("basic_info" permission). Will fail with "Invalid permissions" on "public_profile".
web视图只对话框,API 2.0(public_profile权限)的作品。
将失败,无效的范围:basic_info使用public_profile。
The webview dialog only works with API 2.0 ("public_profile" permission). Will fail with "Invalid Scope: basic_info. Use public_profile".
最好的解决将是迫使SDK忽略FB应用,并使用web视图登录所有的时间。可这在Android中怎么办?
The best fix would be to force the sdk to ignore the FB App and use webview to login all the time. Can this be done in Android?
推荐答案
是的,试试这个
openRequest.setLoginBehavior(SessionLoginBehavior.SUPPRESS_SSO);
或者,如果你使用旧的FB SDK
Or, if you use old fb sdk
authorize(activity, permissions, FORCE_DIALOG_AUTH, listener);
这篇关于Facebook的统一SDK,如何强制使用登录的WebView而不是FB应用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!