facebookarchive / react-native-fbsdk

A React Native wrapper around the Facebook SDKs for Android and iOS. Provides access to Facebook login, sharing, graph requests, app events etc.
https://developers.facebook.com/docs/react-native
Other
2.99k stars 908 forks source link

Login with native dialog #49

Closed khanetor closed 9 years ago

khanetor commented 9 years ago

I notice that apps like Tinder have native login dialog, i.e. they don't open a web view for logging in. I am trying to achieve the same thing with React Native FBSDKLoginButton, and try to set the loginBehavior prop to native, but it seems no matter what the value is, a web view pops up. Is this a missing feature of react-native-fbsdklogin or a misconfig from my part?

khanetor commented 9 years ago

It seems that all the dialogs (including share dialogs) are web view.

mingflifb commented 9 years ago

It depends on the underlying version of the Facebook SDK that you're using. We changed some behaviors for iOS9, Tinder might still be on the old versions of the SDK.

khanetor commented 9 years ago

Could you explain further why you made such change? Is there any circumstance that the native dialog will be available?

On Sat, Oct 10, 2015, 1:43 AM Ming Li notifications@github.com wrote:

It depends on the underlying version of the Facebook SDK that you're using. We changed some behaviors for iOS9, Tinder might still be on the old versions of the SDK.

— Reply to this email directly or view it on GitHub https://github.com/facebook/react-native-fbsdk/issues/49#issuecomment-146958083 .

mingflifb commented 9 years ago

With iOS 9, there are two OS-level changes that affected this decision.

  1. There's now an interstitial that pops up the first time a native app switch happens. We believe this could be disruptive to the user.
  2. There's now a SFSafariViewController which shares cookies with Safari, which does not require an app switch, and provides a relatively low friction way to log in (or accept permissions if the user has already logged into FB on Safari).

We're still evaluating this change in behavior, and will update the behavior if one experience is clearly better for the user.

alfonsodev commented 8 years ago

@mingflifb Thanks for the information but is there a way to force native dialog ? Which version of the SDK supports it ?

danvass commented 8 years ago

@mingflifb As asked above, is there a way to force native? Surely there should be an option to do so even if you have changed the default.

GeoffreyPlitt commented 8 years ago

+1 - no answers since Oct 2015?