I'm trying to post an image with hashtag to facebook using react-native-fbsdk(0.4.0) like this:
ShareDialog.canShow(shareContent)
.then(canShow => {
if (canShow) {
return ShareDialog.show(shareContent);
} else {
return Promise.reject('error sharing');
}
})
.then(result => {
// evaluating result here
});
Share dialog appears normally and content is posted to FB when shareContent
has the following content:
shareContent = {
contentType: 'photo',
photos: [{
imageUrl: 'valid uri'
}]
};
When I add a hashtag, share dialog doesn't appear and result
is an empty object {}
:
shareContent = {
contentType: 'photo',
commonParameters: {
hashtag: '#SomeHashTag'
},
photos: [{
imageUrl: 'the same valid uri'
}]
};
Also if I try to add a hashtag to other types like link
share dialog works fine.
What I am doing wrong? :(
I've got the same problem. I wrote printF for displaying what happens inside FBSDKSharePhoto. And I noticed next info:
canOpenURL: failed for URL: "fbauth2:/" - error: "The operation couldn’t be completed. (OSStatus error -10814.)"
Then I've googled this question and install facebook app on Iphone and loggedIn (you can't install facebook on emulator device you need use real device for this) And it works for me.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With