Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/react-native/7.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
React native 将带有标签的本地帖子图像反应到facebook_React Native_React Native Fbsdk - Fatal编程技术网

React native 将带有标签的本地帖子图像反应到facebook

React native 将带有标签的本地帖子图像反应到facebook,react-native,react-native-fbsdk,React Native,React Native Fbsdk,我正在尝试使用react native fbsdk(0.4.0)将带有标签的图像发布到facebook,如下所示: ShareDialog.canShow(shareContent) .then(canShow => { if (canShow) { return ShareDialog.show(shareContent); } else { return Promise.reject('error sharing'); } })

我正在尝试使用react native fbsdk(0.4.0)将带有标签的图像发布到facebook,如下所示:

ShareDialog.canShow(shareContent)
  .then(canShow => {
    if (canShow) {
      return ShareDialog.show(shareContent);
    } else {
      return Promise.reject('error sharing');
    }
 })
 .then(result => {
   // evaluating result here
 });
shareContent
包含以下内容时,共享对话框将正常显示,内容将发布到FB:

shareContent = {
  contentType: 'photo',
  photos: [{
    imageUrl: 'valid uri'
  }]
};
添加hashtag时,共享对话框不会出现,
result
是一个空对象
{}

shareContent = {
  contentType: 'photo',
  commonParameters: {
    hashtag: '#SomeHashTag'
  },
  photos: [{
    imageUrl: 'the same valid uri'
  }]
};
另外,如果我尝试向其他类型(如
link
share dialog)添加hashtag,也可以很好地工作


我做错了什么(

我也遇到了同样的问题。我编写了printF来显示FBSDKSharePhoto内部发生的情况。我注意到了下面的信息:

canOpenURL:URL:“fbauth2:/”失败-错误:“操作失败。” 无法完成。(OSStatus错误-10814)。”

然后我用谷歌搜索并在Iphone和loggedIn上安装facebook应用程序(你不能在模拟器设备上安装facebook,你需要使用真实设备)
它对我很有用。

我有一个外部图像URL。我如何将其转换为本地URI以使用Facebook共享发送?你知道如何转换吗?当我使用“#myhashtag”时,对话框不会打开,当我使用“myhashtag”时,标签不会显示在对话框中或稍后的共享内容中。。。