Search code examples
iosreact-nativereact-native-fbsdk

Can't link react-native-fbsdk iOS


I tried to integrate the FacebookSDK for iOS in React Native. I followed all steps from the getting started guide and now I am getting a red rectangle instead of a Login Button when running the app.

When I try to run 'react-native link react-native-fbsdk' I am getting this output:

rnpm-install info Android module react-native-fbsdk is already linked 
rnpm-install info Linking react-native-fbsdk ios dependency 
rnpm-install ERR! Something went wrong while linking. Error: Expected "/*", "//", or "{" but "<" found. 
Please file an issue here: https://github.com/facebook/react-native/issues 

Expected "/*", "//", or "{" but "<" found.
  • I have react-native-fbsdk in my node_modules
  • I have the path to the Facebook SDK in my Build Settings -> Framework Search Paths in Xcode
  • I have the frameworks linked in the Build Phases -> Link Binary with Libraries

Solution

  • Based on my personal experience, I can't use the FBSDK that was installed via NPM in iOS. You should follow all the steps provided here https://developers.facebook.com/docs/ios/getting-started to integrate with FBSDK. It should be work properly after that.