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

Are 'web' lobinBehavior deprecated? #573

Closed tkow closed 5 years ago

tkow commented 5 years ago

As related to latest updated, https://github.com/facebook/react-native-fbsdk/issues/422 was not solution for re-login now. Is there any alternafive? If we passed web to setLoginBehavior, error message show

Invalid FBSDKLobinBehavior 'web'. should be one of :(browser)

🐛 Bug Report

To Reproduce

Expected Behavior

Code Example

Environment

bernhardt1 commented 5 years ago

@tkow In the latest release they changed the login behavior enum. Here is a copy of the FBLoginManager file.

I do this now: LoginManager.setLoginBehavior(Platform.OS === 'ios' ? 'browser' : 'native_with_fallback');

export type LoginBehavior = LoginBehaviorIOS | LoginBehaviorAndroid;
/**
 * Indicate how Facebook Login should be attempted on Android.
 */
export type LoginBehaviorAndroid =
  // Attempt login in using the Facebook App, and if that does not work fall back to web dialog auth.
  | 'native_with_fallback'
  // Only attempt to login using the Facebook App.
  | 'native_only'
  // Only the web dialog auth should be used.
  | 'web_only';
/**
 * Indicate how Facebook Login should be attempted on iOS.
 */
export type LoginBehaviorIOS =
  // Attempts log in through the Safari browser.
  // This is the only behavior supported by the native sdk.
  'browser';
/**
tkow commented 5 years ago

@bernhardt1 Thanks for reply. This is an answer, so I close this issue.