简体   繁体   English

登录时打开Facebook应用程序,Uber怎么做?

[英]Open Facebook app on login, how does Uber do it?

How does Uber open Facebook app, when user is login in with facebook? 当用户使用Facebook登录时,Uber如何打开Facebook应用程序?

In my case, I have a project with iOS8 deployment target, 4.16 FBSDK and app always opens SafariView, which is done by design, I guess ? 就我而言,我有一个带有iOS8部署目标,4.16 FBSDK的项目,并且应用程序始终会打开SafariView,这是设计使然,我猜

Does Uber use an old SKD or I am simply using FBSDK wrong? 优步会使用旧的SKD还是我只是在错误地使用FBSDK? This is how I login. 这就是我的登录方式。 I even set to use native app. 我什至准备使用本机应用程序。

fbLoginManager.loginBehavior = .Native 
fbLoginManager.logInWithReadPermissions(["email", "public_profile", "user_birthday"], fromViewController: vc) { (result, error) in...

And I've modified plist according to Facebook 而且我根据Facebook修改了plist

Facebook previously open the Facebook native app if it was installed in your device. 如果您的设备上安装了Facebook本地应用程序,则Facebook先前会打开它。

But From iOS9, This is now the default behaviour for Facebook SSO. 但是从iOS9开始,这现在是Facebook SSO的默认行为。

According to them opening Facebook in Safari is a better UI experience for users. 根据他们的说法,在Safari中打开Facebook对于用户而言是更好的UI体验。 By modifying keys in .plist will not help to open native app. 通过修改.plist中的键将无法打开本机应用程序。

https://developers.facebook.com/blog/post/2015/10/29/Facebook-Login-iOS9/ https://developers.facebook.com/blog/post/2015/10/29/Facebook-Login-iOS9/

For apps on iOS 8 and below, Facebook Login checks to see if the Facebook app is installed on the device. 对于iOS 8及以下版本的应用,Facebook登录会检查设备上是否安装了Facebook应用。 If the app is installed, the SDK switches to the Facebook app via a fast-app-switch to display the Login experience. 如果已安装该应用程序,则SDK会通过快速应用程序开关切换到Facebook应用程序,以显示登录体验。

Check in Which iOS version, you are checking Uber app. 检查您正在检查哪个iOS版本的Uber应用程序。 But as far as it concern, you will get logged in properly using browser too. 但就其所关心的而言,您也将使用浏览器正确登录。

You can use old sdk to achieve this functionality. 您可以使用旧的SDK来实现此功能。

If you are using Facebook SDK v4.6, It will use Safari view controller by default. 如果您使用的是Facebook SDK v4.6,则默认情况下它将使用Safari视图控制器。

Try using a version of the SDK v4.5 or older and all the settings in plist according to it. 尝试使用SDK v4.5或更旧的版本,并根据它使用plist中的所有设置。 For more information on this regarding plist and code for SDK v4.5 you can checkout this link : https://developers.facebook.com/docs/ios/ios9 有关SDK v4.5的plist和代码的更多信息,您可以查看以下链接: https : //developers.facebook.com/docs/ios/ios9

I had this issue, but it was resolved when I turned my Facebook App (on the Facebook dev site) live. 我遇到了这个问题,但是当我打开我的Facebook App(在Facebook开发站点上)时,它已得到解决。

When it was in dev mode, it did the SSO in Safari, and when released it did it through the native app 在开发模式下,它在Safari中执行SSO,在发布时通过本地应用程序进行。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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