A
A
alzow2019-01-09 17:36:50
Facebook
alzow, 2019-01-09 17:36:50

How to implement facebook login in react-native application?

I'm trying to implement Facebook login in my pet project, I did everything according to the instructions:
from here
and from here
. As a result, I get an error:

Invariant Violation: Invariant Violation: Invariant Violation: requireNativeComponent: "RCTFBLoginButton" was not found in the UIManager.

This error is located at:
    in RCTFBLoginButton (at FBLoginButton.js:112)
    in n (at FBLoginButton.js:9)
    in RCTView (at View.js:45)
    in n (at SignInScreen.js:34)
    in RCTView (at View.js:45)
    in RCTScrollView (at ScrollView.js:977)
    in ScrollView (at KeyboardAwareHOC.js:397)
    in S (at Content.js:125)
    in u (at connectStyle.js:384)
    in Styled(u) (at SignInScreen.js:26)
    in RCTView (at View.js:45)
    in s (at connectStyle.js:384)
    in Styled(s) (at SignInScreen.js:25)
    in t (at SceneView.js:9)
    in f (at StackViewLayout.js:478)
    in RCTView (at View.js:45)
    in RCTView (at View.js:45)
    in RCTView (at View.js:45)
    in v (at screens.js:51)
    in h (at StackViewCard.js:42)
    in n (at createPointerEventsContainer.js:26)
    in h (at StackViewLayout.js:507)
    in RCTView (at View.js:45)
    in l (at StackViewLayout.js:401)
    in RCTView (at View.js:45)
    in h (at withOrientation.js:30)
    in v (at StackView.js:49)
    in RCTView (at View.js:45)
    in h (at StackView.js:19)
    in v (at createNavigator.js:57)
    in b (at createKeyboardAwareNavigator.js:11)
    in v (at createNavigationContainer.js:376)
    in b (at SceneView.js:9)
    in f (at SwitchView.js:12)
    in p (at createNavigator.js:57)
    in b (at createNavigationContainer.js:376)
    in b (at App.js:33)
    in RCTView (at View.js:45)
    in RCTView (at View.js:45)
    in f (at connectStyle.js:384)
    in Styled(f) (at App.js:29)
    in l (at App.js:28)
    in b (at registerRootComponent.js:17)
    in c (at registerRootComponent.js:16)
    in o (at renderApplication.js:34)
    in RCTView (at View.js:45)
    in RCTView (at View.js:45)
    in p (at renderApplication.js:33)

This error is located at:
    in b (at SceneView.js:9)
    in f (at SwitchView.js:12)
    in p (at createNavigator.js:57)
    in b (at createNavigationContainer.js:376)
    in b (at App.js:33)
    in RCTView (at View.js:45)
    in RCTView (at View.js:45)
    in f (at connectStyle.js:384)
    in Styled(f) (at App.js:29)
    in l (at App.js:28)
    in b (at registerRootComponent.js:17)
    in c (at registerRootComponent.js:16)
    in o (at renderApplication.js:34)
    in RCTView (at View.js:45)
    in RCTView (at View.js:45)
    in p (at renderApplication.js:33)

This error is located at:
    in b (at App.js:33)
    in RCTView (at View.js:45)
    in RCTView (at View.js:45)
    in f (at connectStyle.js:384)
    in Styled(f) (at App.js:29)
    in l (at App.js:28)
    in b (at registerRootComponent.js:17)
    in c (at registerRootComponent.js:16)
    in o (at renderApplication.js:34)
    in RCTView (at View.js:45)
    in RCTView (at View.js:45)
    in p (at renderApplication.js:33)
- node_modules/react-native/Libraries/ReactNative/getNativeComponentAttributes.js:29:18 in exports
- node_modules/react-native/Libraries/Renderer/shims/ReactNativeViewConfigRegistry.js:104:17 in get
- node_modules/react-native/Libraries/Renderer/oss/ReactNativeRenderer-dev.js:3955:53 in Vr
- node_modules/react-native/Libraries/Renderer/oss/ReactNativeRenderer-dev.js:13218:12 in Wc
- node_modules/react-native/Libraries/Renderer/oss/ReactNativeRenderer-dev.js:15670:10 in Zf
- node_modules/react-native/Libraries/Renderer/oss/ReactNativeRenderer-dev.js:15880:30 in ed
- node_modules/react-native/Libraries/Renderer/oss/ReactNativeRenderer-dev.js:15892:41 in td
- node_modules/react-native/Libraries/Renderer/oss/ReactNativeRenderer-dev.js:15996:15 in nd
- node_modules/react-native/Libraries/Renderer/oss/ReactNativeRenderer-dev.js:16976:17 in $d
- node_modules/react-native/Libraries/Renderer/oss/ReactNativeRenderer-dev.js:16877:24 in Qd
- node_modules/react-native/Libraries/Renderer/oss/ReactNativeRenderer-dev.js:16838:14 in Yd
- node_modules/react-native/Libraries/Renderer/oss/ReactNativeRenderer-dev.js:16703:4 in jd
- node_modules/react-native/Libraries/Renderer/oss/ReactNativeRenderer-dev.js:16504:16 in sd
- node_modules/react-native/Libraries/Renderer/oss/ReactNativeRenderer-dev.js:8481:17 in enqueueSetState
- node_modules/react/cjs/react.development.js:372:31 in setState
- node_modules/react-navigation/src/createNavigationContainer.js:342:13 in dispatch
- node_modules/react-navigation/src/getChildNavigation.js:56:33 in <unknown>
* screens/AuthLoadingScreen.js:18:35 in <unknown>
- node_modules/@babel/runtime/node_modules/regenerator-runtime/runtime.js:62:44 in k
- node_modules/@babel/runtime/node_modules/regenerator-runtime/runtime.js:288:30 in <unknown>
- ... 13 more stack frames from framework internals

Answer the question

In order to leave comments, you need to log in

3 answer(s)
Димка Реактнативный, 2019-01-09
@raoffonom

Попробуйте пересоберать проект.

D
davidnum95, 2019-01-11
@davidnum95

Ошибка говорит, что не может найти нативный модуль. Судя по всему вы настроили только для андроида, это тоже сделали?

S
Shane Matte, 2020-05-12
@mattedev

Invariant Violation: requireNativeComponent: "RCTFBLoginButton"
./gradlew clean and react-native run-android

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question