如何取消Facebook登录? [英] How to cancel facebook login?
问题描述
我刚刚在我的移动游戏应用程序中添加了 facebook 功能,并根据教程
I have just added a facebook feature to my mobile game-app and implemented SSO (Single Sign-On) according to the tutorial https://developers.facebook.com/docs/mobile/ios/build/.
如果用户尚未安装facebook的应用程序,则SSO将启动显示facebook登录页面的safari.但是,某些用户可能不喜欢继续(他们甚至可能没有Facebook帐户).
If the user has not installed facebook's app, SSO launches safari which displays the facebook login page. However, some users may not like to proceed (they may not even have a facebook account).
我可以以某种方式配置SSO,以使用户无需登录Facebook即可回滚并返回游戏吗?
Can I somehow configure SSO to make it possible for the user to roll back and return to the game without logging in to facebook?
推荐答案
替代方法:您可以在 Facebook.m 中将authorize方法更改为具有inAuthApp标志:
An alternative: You could change the authorize method in Facebook.m to have an inAuthApp flag:
- (void)authorize:(NSArray *)permissions usingInAppAuth: (BOOL) inAppAuth {
self.permissions = permissions;
[self authorizeWithFBAppAuth: (inAppAuth) ? NO : YES safariAuth: (inAppAuth) ? NO : YES];
}
此代码:
[facebook authorize:permissions usingInAppAuth:YES];
强制身份验证过程在UIWebView中运行,并且用户可以在不离开应用程序的情况下取消该过程.
forces the authentication process to work inside a UIWebView and there the user could cancel the process without leaving the app.
这篇关于如何取消Facebook登录?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!