我尝试在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.
答案 0 :(得分:0)
首先安装旧版本的fbsdk
npm install react-native-fbsdk@0.6.0 --save
然后运行此命令
react-native link react-native-fbsdk
之后你可以更新fbsdk
答案 1 :(得分:0)
根据我的个人经验,我不能使用在iOS中通过NPM安装的FBSDK。您应该按照此处提供的所有步骤https://developers.facebook.com/docs/ios/getting-started与FBSDK集成。之后它应该正常工作。