I am attempting to provide a share button using the navigator.share()
api, but when sharing to certain platforms (e.g Telegram, Slack) the text is missing.
I have seen people claim that only the link is shareable to certain platforms, and I would accept this as a limitation if not for the fact that the popular game Wordle is able to copy text.Here is an example of what the Wordle output looks like within Telegram. More than that, Wordle clearly uses the Web Share API. Does anyone know how Wordle accomplishes this? Below is the code I currently have, which only produces a URL on telegram/slack.
if (navigator.share) {
navigator.share({
text: fullText, //some non-empty text string.
url: url,
title: title
})
}
else {
navigator.clipboard.writeText(fullText);
setCopied(true);
}
Note: Like wordle, this code is running in a browser, tested on an iPhone 8+