gpt4 book ai didi

react-native - 将带有标签的 Native Post 图像 react 到 Facebook

转载 作者:行者123 更新时间:2023-12-04 04:37:36 25 4
gpt4 key购买 nike

我正在尝试使用 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'
}]
};

当我添加主题标签时,不会出现共享对话框和 result是一个空对象 {} :
shareContent = {
contentType: 'photo',
commonParameters: {
hashtag: '#SomeHashTag'
},
photos: [{
imageUrl: 'the same valid uri'
}]
};

此外,如果我尝试将主题标签添加到其他类型,例如 link共享对话框工作正常。

我做错了什么? :(

最佳答案

我有同样的问题。我编写了printF 来显示FBSDKSharePhoto 中发生的事情。我注意到下一个信息:

canOpenURL: failed for URL: "fbauth2:/" - error: "The operation couldn’t be completed. (OSStatus error -10814.)"



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

关于react-native - 将带有标签的 Native Post 图像 react 到 Facebook,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41130961/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com