html - 如何将超链接添加到 HTML 电子邮件|twitter|linkedin 正文?
问题描述
我有一个带有 3 个共享按钮(电子邮件、Linkedin、推特)的小网站。
我正在尝试分享一个看起来相当糟糕的链接:
这是我在我的 HTML 中使用的:
<a class="twitter" href=""</a>
<a class="email" href=""</a>
<a class="linkedin" href=""</a>
参考资料:
电子邮件:“mailto:?body=查看这篇文章摘要”+ugly_url+“&subject=摘要工具”;
推特:“https://twitter.com/intent/tweet?text="+ugly_url
linkedin :"https://www.linkedin.com/shareArticle?mini=true&url=" +ugly_url + "&title=临时标题&source=Chillyfacts";
如何将凌乱的 URL 转换为超链接?
我的链接
解决方案
您似乎正在尝试通过创建带有内置参数的链接来与网站交互。正确的方法是创建一个与这些网站交互的 API。
网站通常有专门向您展示如何做到这一点的页面。您通常可以通过谷歌搜索“websiteName API”找到它们。例如,推特是这样的
推荐阅读
- c++ - C++:类定义中的sizeof(member)
- html - 根目录中的 Favicon - 仍然需要链接元素吗?
- c - 始终包含标准标题是一种好习惯吗?
- c++ - 使用 Qt5 & c++ 制作扫雷游戏
- java - 如何使用 Java 客户端更新 Elastic Search 上的条目
- python - 检测是否使用 django 打开了多个浏览器/选项卡
- java - Kotlin 生成的字节码会影响方法计数吗?
- python - 文字字符串插值 - 限制范围?
- modeling - 如何修复我的罗丹平台 Event-B 项目中的未知配置 org.animb.valuation.valBase?
- pdf - pdf 文件中的外部参照表