【发布时间】:2016-11-15 16:45:02
【问题描述】:
我正在尝试使用 ShareDialog 通过 React-Native-FBSDK 库共享一个链接。我的代码设置如下:
const shareContent = {
contentType: 'link',
contentDescription: 'Stuff here',
contentTitle: 'Share Title',
contentUrl: 'https://google.com',
imageUrl: someUrl
}
ShareDialog.canShow(shareContent).then((canShow) => {
canShow && ShareDialog.show(shareContent);
}
当它在 Safari WebView 中打开时,此代码在模拟器中有效,但是当我在安装了 Facebook 应用程序的设备上加载它时,它会在我的应用程序上打开一个模型,但它只使用我给它的 url,然后它会填充在页面上元标记的所有其他数据中,而不是使用我的代码。我需要做些什么才能让它与本机应用程序一起使用吗?
iOS 10,react-native 0.30.0,react-native-fbsdk 0.4.0
【问题讨论】:
标签: dialog react-native share facebook-sdk-4.0 fbsdk