不能 link react-native-fbsdk iOS

Can't link react-native-fbsdk iOS

我尝试在 React Native 中集成 iOS 的 FacebookSDK。我按照入门指南中的所有步骤进行操作,现在 运行 应用程序时我得到一个红色矩形而不是登录按钮。

当我尝试 运行 'react-native link react-native-fbsdk' 我得到这个输出:

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.

首先安装旧版本的fbsdk

npm install react-native-fbsdk@0.6.0 --save

然后运行这个命令

react-native link react-native-fbsdk

之后你可以更新fbsdk

根据我个人的经验,我无法使用iOS中通过NPM安装的FBSDK。您应该按照此处提供的所有步骤 https://developers.facebook.com/docs/ios/getting-started 与 FBSDK 集成。之后应该可以正常使用了。