Blog coding and discussion of coding about JavaScript, PHP, CGI, general web building etc.

Wednesday, December 16, 2015

Facebook Login - iOS 9 - Without Safari

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 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(@"");  }];  

Answer by Filip Busic for Facebook Login - iOS 9 - Without Safari


Using 20150708 solved it for me in iOS 9.

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

Answer by Lucas Brito for Facebook Login - iOS 9 - Without Safari


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

Answer by Justin W for Facebook Login - iOS 9 - Without Safari


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.

Answer by dondonhk for Facebook Login - iOS 9 - Without Safari


I followed the doc here: https://developers.facebook.com/docs/ios/ios9

after adding point 2 and 3, my app switches to native facebook app for login...

Answer by mati2021 for Facebook Login - iOS 9 - Without Safari


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.

Answer by levantAJ for Facebook Login - iOS 9 - Without Safari


Using this version with CocoaPods:

pod 'FBSDKCoreKit', '4.4.0'  pod 'FBSDKLoginKit', '4.4.0'  pod 'FBSDKShareKit', '4.4.0'  

Answer by Krishna Gawade for Facebook Login - iOS 9 - Without Safari


In swift When your select login behavior is Web, Then open webView popUp. There is no login redirect to safari browser

// Try to login with permissions      let fbLoginManager : FBSDKLoginManager = FBSDKLoginManager()        fbLoginManager.loginBehavior = FBSDKLoginBehavior.Web  


Fatal error: Call to a member function getElementsByTagName() on a non-object in D:\XAMPP INSTALLASTION\xampp\htdocs\endunpratama9i\www-stackoverflow-info-proses.php on line 71

  35 comments:

  1. you understand the script perfectly. You can create a more secure system, and also accesses more information into Visual Basic like, user profile name, update status on Facebook and much more. www.facebook.com login or sign up for facebook

    ReplyDelete
  2. get the list mobile wallpaper, ringtones and mobile themes.
    http://www.kikguru.com/zedge-zedge-wallpaper-zedge-ringtones/

    ReplyDelete
  3. http://www.makeoverarena.com/sefan-ru-apps-videos-downloads/

    ReplyDelete
  4. Great article
    http://www.gigihealth.com/

    ReplyDelete
  5. I love this article. Thanks for sharing
    http://www.urbantvshows.com/

    ReplyDelete
  6. Hey guys check this out
    http://www.makeoverarena.com/wwwwapkingcc-wapking-mp3-song-wapking-video-song-download/

    ReplyDelete
  7. just click on it
    http://trendebook.com/gmx-mail-free-webmail-gmx-login-www-gmx-com/

    ReplyDelete
  8. http://trendebook.com/juno-email-juno-online-services-www-juno-com/

    ReplyDelete
  9. http://trendebook.com/filmywap-movies-download-www-filmywap-com/

    ReplyDelete
  10. Hey,
    thank you a big big time !!
    I was looking for something like this for so long. You are in my bookmark now (y) Thank a million zillion trillion times!!
    Thank you!
    Best blogger apps for android

    ReplyDelete
  11. Great content
    thegeekuniversity.com/columbia-universitywww-columbia-edu

    ReplyDelete
  12. love this post...content worth sharing
    thegeekuniversity.com/new-york-university-www-nyu-edu

    ReplyDelete
  13. great postthegeekuniversity.com/new-york-university-www-nyu-edu

    ReplyDelete
  14. love this article
    thegeekuniversity.com/new-york-university-www-nyu-edu

    ReplyDelete
  15. This is great, if got an Emails about this, and it was great

    ReplyDelete
  16. Wow!! really niceThanks for this update<a href="https://www.makeoverarena.com/toxicwap-com-full-mp3-downloads-android-games-tv-series/">,i really appreciate</a&gt

    ReplyDelete
  17. Wow!!! thats a great number of listeners at a go, if only more people will be committed in getting their firestone credit card login Comerica bank login for their online trasactions...

    ReplyDelete
  18. ToxicWap is a website built mainly for downloading different Apps such as music, movies, tv series, android games and apps, videos, wallpapers, and eBooks. Toxicwap as a lot of nice and wonderful features. It is also the most trusted and a very popular mobile website for all your free mobile download needs.

    ReplyDelete
  19. Thank you for the sensible critique. Me and my neighbor we were doing some research about this but will never find a useful and nice information like the ones will saw on your website . I think I learned more clear from this post. I am very glad to see such wonderful info being shared freely out there.one thing i should let you know, your way of
    writing skill has motivate me to start my own blog now.you can click to see all the package i have for you and please don't fail to write me back. thanks for all your effort.

    ReplyDelete
  20. i love this article, check out mine at https://trendebook.com/triangle-world-mastercard-collect-canadian-tire-money-triangle-credit-card-login/

    ReplyDelete
  21. Nice one, Thanks for sharing valuable information with us. Looking forward to learning more from you. Peniel Rita.

    ReplyDelete

Popular Posts

Powered by Blogger.