Я делюсь ссылкой через Facebook Messenger и хочу также поделиться названием и описанием содержания.Тем не менее, описание контента и заголовок контента никогда не появляется, только ссылка.
Вот код:
state = {
shareLinkContent: {
contentType: 'link',
contentUrl: "https://facebook.com",
contentDescription: 'Wow, check out this great site!',
contentTitle: "Test title"
}
}
shareLinkWithShareDialog= () => {
var tmp = this;
MessageDialog.canShow(this.state.shareLinkContent).then(
function(canShow) {
if (canShow) {
return MessageDialog.show(tmp.state.shareLinkContent);
}
}
).then(
function(result) {
if (result.isCancelled) {
console.log('Share cancelled');
} else {
console.log('Share success with postId: '
+ result.postId);
}
},
function(error) {
console.log('Share fail with error: ' + error);
}
);
}