【发布时间】:2021-01-27 10:16:08
【问题描述】:
我需要通过 JavaScript 和 HTML 在 twitter 上分享图片。我正在使用下面的代码及其工作,但 ts 显示为链接而不是图像。我不想创建开发者应用程序并直接在 twitter 上分享硬编码图像。
<a href="http://twitter.com/share?url=https://i.picsum.photos/id/313/200/300.jpg?hmac=7_pHHv7TyDti50LaIVPvCPkdWDgM0tcX3ViCIWruEDQ&text=This is twitter share" target="_blank">
<img class="shareUlLi" id="shareTwitter" src="./images/twitter.png" alt="Twitter Share" title="Twitter Share"/>
</a>
【问题讨论】:
标签: javascript html twitter share