I realized that the problem is (as RN points out) the mismatch between the native details and the JS on the details that each view uses. Namely:
- renderToHardwareTextureAndroid
- Onlayout
- accessibilityLiveRegion
- accessibilityComponentType
- importantForAccessibility
- accessibilityLabel
- Testid
Since I do not use any of the types that the package uses, namely:
- Fblikeview
- FBLoginButton
- FBSendButton
- FBShareButton
I tried to set this props as "native", so that they are not tied to the JavaScript side. In each component (in the FBShareButton.js example), I replaced:
const RCTFBShareButton = requireNativeComponent( 'RCTFBShareButton', ShareButton, );
with
const RCTFBShareButton = requireNativeComponent( 'RCTFBShareButton', ShareButton, { nativeOnly: { onChange: true, onLayout: true, testID: true, importantForAccessibility: true, accessibilityLiveRegion: true, accessibilityComponentType: true, accessibilityLabel: true, renderToHardwareTextureAndroid: true, } }, );
Now I'm going to check if the views are displayed correctly and edit my post later, but if you just want to compile your application to continue development (since this is my case at the moment), this should allow you to do this.
Edit
I successfully executed the LoginButton component using an example in README with my changes.
Edit 2
I made a transfer request with my changes in the package. I don’t like the solution, but it can get FB’s attention. In the meantime, you can just use your plug. In package.json simply replace the fbsdk line as follows:
"react-native-fbsdk": "git+https://github.com/motius/react-native-fbsdk.git#fix-views"
This other pull request might be the best solution actually.