Facebook Login - iOS 9 - Without Safari

facebook login ios swift
ios 13 facebook login not working
login with facebook app ios not working
facebook sdk ios
facebook login swift 4 tutorial
ios facebook login without leaving app
facebook login swift 5
facebook login swift 5 tutorial

It worked fine to login with logInWithReadPermissions in iOS 8, but as soon after the update to iOS 9 it keeps opening Safari or a modal UIWebView.

Does anyone have the same issue?

FBSDKLoginManager *login = [[FBSDKLoginManager alloc] init];
[login setLoginBehavior:FBSDKLoginBehaviorNative];
[login logInWithReadPermissions:@[@"public_profile",@"email"] fromViewController:nil handler:^(FBSDKLoginManagerLoginResult *result, NSError *error) {
    NSLog(@"");
}];

Seems there's no way to get the previous behavior using newests FB SDKs in iOS9+. You can use an old SDK to do that. Here's a response from the facebook to that question:

iOS - Facebook Login, Facebook Login for iOS - Quickstart. When people log into your app with Facebook, they can grant permissions to your app so you can retrieve information or� On iOS 9, there are two primary ways to to implement Facebook Login. Each is different than the app switch experience that was the default on iOS 8. The SDK could continue to switch from your app to the Facebook app. The SDK could use the new Safari View Controller (SVC) to show the Login UX in the browser.

From now You can change loginBehavior to FBSDKLoginBehaviorSystemAccount, so FBSDKLoginManager gets Facebook logged in user from iOS Facebook Settings ;)

FBSDKLoginManager *fbLogin = [[FBSDKLoginManager alloc] init];
fbLogin.loginBehavior = FBSDKLoginBehaviorSystemAccount;

From FBSDKLoginManager:

Declaration: FBSDKLoginBehaviorSystemAccount Description: If the account is not available to the app (either not configured by user or as determined by the SDK) this behavior falls back to FBSDKLoginBehaviorNative. Note: If the account is not available to the app (either not configured by user or as determined by the SDK) this behavior falls back to FBSDKLoginBehaviorNative.

Facebook Login on iOS9, The SDK could use the new Safari View Controller (SVC) to show the Login UX in the browser. On iOS 9, when one app attempts to open another app, people� Create an account or log into Facebook. Connect with friends, family and other people you know. Share photos and videos, send messages and get updates.

Using 20150708 solved it for me in iOS 9.

Link to SDK: https://developers.facebook.com/resources/FacebookSDKs-iOS-20150708.pkg

iOS 13 cannot login � Issue #1067 � facebook/facebook-ios-sdk , But if you are already login facebook in your Safari, you can login Bool has been deprecated since iOS 9 so Im assuming no one is using that� Facebook Login for iOS - Quickstart When people log into your app with Facebook, they can grant permissions to your app so you can retrieve information or perform actions on Facebook on their behalf. The following steps are for adding Facebook Login to your iOS project.

If you want to use the latest SDK and also the native login behaviour on iOS 9

Edit FBSDKServerConfiguration.m's function to always return true

- (BOOL)useNativeDialogForDialogName:(NSString *)dialogName
{
  return @YES;
}

Falling back to Safari still work if the Facebook app isn't installed

Facebook login on iOS 9 happens via the browser, even if the app is , It seems Facebook no longer has a deep-linking setting on their App Facebook login on iOS 9 happens via the browser, even if the app is installed #53 Safari login can cause user account mismatch compared to native� Click in the top right of Facebook. Select Settings & Privacy > Settings. Click Security and Login. Click Edit next to Save your login info. Select the device or browser you want to remove.

I noticed that in both changelogs, as well:

Facebook SDK for iOS Changelog v4.x

(v4.6.0 - September 10, 2015) In addition, the SDK dialogs such as Login, Like, Share Dialogs automatically determine the best UI based on the device, including SFSafariViewController instead of Safari. Follow the our Preparing for iOS 9 guide.

Facebook SDK for iOS Changelog v3.x

(v3.24.0 - September 10th 2015) In addition, the SDK dialogs such as Login, Like, Share Dialogs automatically determine the best UI based on the device, including SFSafariViewController instead of Safari. Follow the our Preparing for iOS 9 guide.

Cannot connect facebook in mobile browser, However I can't connect FB in my latest iOS(9.3.2) in Safari. log in doesn't show any error, just keep on repeating myself to login but no avail. Log into Facebook to start sharing and connecting with your friends, family, and people you know.

Facebook login not working iOS 10, I am already on the latest Facebook iOS SDK, 4.13.1, there are no updates, and I I've been able to successfully login with Facebook by tapping the little Open in Safari icon at the It ocures on both iOS 9 and iOS 10 when built with XCode 8. I would STOP using that nearly 3-year old Safari web browser, as it is, probably, not safe and secure to use any longer, and seek out a third party web browser that is STILL currently being updated and STILL being supported on iOS 9.3.5. Here are a few third party web browsers that I know are STILL being updated and supported on iOS 9.

Facebook login on iOS9 with SafariViewController, Get your Facebook login ready for iOS9 with SFSafariViewController. Facebook is getting ready for iOS 9 and got its SDK updated with very few No more app jumping and confusing configs, everything has been taken� iOS has a built-in mechanism for adding account and passwords to your iCloud Keychain. When you start to create an account, Safari will suggest a password for you. If you choose to use that password, Safari will also save your account details to iCloud Keychain. You can learn more about using iCloud Keychain by checking out the following post:

Facebook Login - iOS 9 - Without Safari, It worked fine to login with logInWithReadPermissions in iOS 8, but as soon after the update to iOS 9 it keeps opening Safari or a modal� Safari uses machine learning to identify advertisers and others who track your online behavior, and removes the cross‑site tracking data they leave behind. So your browsing stays your business. And Safari keeps embedded content such as Like buttons, Share buttons, and comment widgets from tracking you without your permission.

Comments
  • Checkout Preparing Your Apps for iOS9.
  • @DanielStorm, yeah I already did that. The answer below solved it for me
  • I'm having the same issue. Worked in iOS 8, but not in iOS 9. I too already made the changes listed in the docs
  • I find that decision interesting.
  • @KevinJantzer - why? We've done extensive testing and research to make this decision. We want people to have the best experience and developers have the most people choose to use Facebook to log into apps - our incentives are aligned.
  • @SimonCross This had me stumped for ages, until i realised i was browsing in private mode. To be honest, i don't want to have to have a session stored in Safari when i already have one with the native FB app. It feels dirty. I also like to clear Safari cookies and sessions frequently for security. What makes the experience worse, is the big yellow message telling me i should be using the native app when i get sent to the web form in Safari. The experience is awful. I think you've made an unnecessary call.
  • @SimonCross Won't this drastically increase user drop off for login funnels (esp. punishing apps who only use Facebook-only login?) My biggest concern is that users won't remember their Facebook credentials to log into the Safari View Controller and will just bounce. Using fast-app-switching eliminates the need to remember email/password info. Did your testing/research show different results?
  • The downside to not using fast-app switching is you're challenged by Facebook Two-Factor Authentication on every single login :(
  • This is the best answer! It simply works.As far as I can see it falls back to LoginBehaviorNative if there is no Facebook account connected to the phone. And LoginBehaviorNative falls back to the popup browser if no app is installed.
  • Strange that Facebook don't think that this is the best default behaviour.
  • Of course, if every app is prompting people to log-in to the Safari View Controller, then they'll be logged in in Safari itself won't they? Which means that Facebook can more easily track a user's web browsing. I'd imagine that most people with the Facebook iOS app installed would have no reason to log in in Safari otherwise. A bit cynical, perhaps, but I can't see why else a Safari View Controller would be considered to be better.
  • I'm not sure what the downside to this is other than if one doesn't have their FB configured on the system level. I agree, this seems to be the best solution.
  • It works!. Incase you are working with Pod, it's Facebook SDK ver 4.4.0
  • Unfortunately this is only working solution because _dialogFlows variable is always nil.
  • Compile errors: #import <FBSDKCoreKit/FBSDKCoreKit.h> not found.