我正在尝试使用react-native-fbsdk(0.4.0)将带有hashtag的图像发布到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'
}]
};
当我添加主题标签时,不显示共享对话框,result
是一个空对象{}
:
shareContent = {
contentType: 'photo',
commonParameters: {
hashtag: '#SomeHashTag'
},
photos: [{
imageUrl: 'the same valid uri'
}]
};
此外,如果我尝试将标签添加到其他类型,例如link
,则共享对话框可以正常工作。
我做错了什么? :(
答案 0 :(得分:1)
我遇到了同样的问题。我写了printF来显示FBSDKSharePhoto内部发生的情况。我注意到下一个信息:
canOpenURL:URL失败:“ fbauth2:/”-错误:“操作 无法完成。 (OSStatus错误-10814。)”
然后我已经在this example上进行了搜索,并在Iphone上安装了Facebook应用并登录(您无法在模拟器设备上安装Facebook,为此需要使用真实设备) 它对我有用。