[英]React / react-share - How can I share not only text but also a link insight my Email etc when sharing content on social media?
I am using react-share and I wonder how /if its possible to share a link insight the email, facebook, twitter etc?我正在使用 react-share,我想知道如何/是否可以共享链接洞察电子邮件、facebook、twitter 等? I was thinking of just including an a tag but that doesnt work and I> couldnt find anything online.我想只包含一个标签,但这不起作用,而且我在网上找不到任何东西。 Any ideas?有什么想法吗? Thanks!!谢谢!!
<EmailShareButton
url="www.example.com"
subject="subject"
body={"hey there, pls share my link" + <a href="www.example.com">Link</a>}
className="Demo__some-network__share-button">
<EmailIcon
size={40}
round/>
</EmailShareButton>
<FacebookShareButton
url="www.example.com"
quote="link"
className="Demo__some-network__share-button">
<FacebookIcon
size={40}
round
/>
</FacebookShareButton>
... ...
Unfortunately this component is using mailto: which prevent inline html to the body.不幸的是,这个组件正在使用 mailto: 阻止内联 html 到正文。 I checked EmailShareButton element on their repository, https://github.com/nygardk/react-share/blob/master/src/EmailShareButton.js#L6我检查了他们存储库中的 EmailShareButton 元素, https://github.com/nygardk/react-share/blob/master/src/EmailShareButton.js#L6
It seems that url
also is skipped and does no action.似乎url
也被跳过并且不执行任何操作。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.