问题
我一直在对链接进行硬编码,以便在 Twitter 上分享一条预先制作的推文 - 无论是在 block 引用中还是在一般网站中,都可以在 http://bdnsun.ca/veteransdoc
中找到>。推文链接可以在桌面上使用,但当我尝试在 iPhone 上分享相同的链接时,它会将我带到移动 Twitter 网站,但没有预先发布的推文。有解决办法吗?
实时链接:http://bdnsun.ca/veteransdoc
index.html
包含硬编码推文的示例,在本例中应为“所有街道都被封锁了……我们知道我们会被俘虏,”Elmer Cole,PoW 幸存者:http://bdnsun.ca/退伍军人文档
<!-- Blockquote -->
<blockquote>
<p class="quote__text">“All the streets were blocked off and they wouldn’t evacuate us because we had to stay and keep the Germans off the beach. So we knew we was gonna get taken prisoner.” </p>
<div class="quote__person">
<p class="quote__name">Elmer Cole</p>
<p class="quote__title">South Saskatchewan Regiment</p>
</div>
<div class="quote__icon">
<a href="https://twitter.com/home?status=%E2%80%9CAll%20the%20streets%20were%20blocked%20off%20%E2%80%A6%20we%20knew%20we%20was%20gonna%20get%20taken%20prisoner,%E2%80%9D%20Elmer%20Cole,%20PoW%20survivor%3A%20http%3A//bdnsun.ca/veteransdoc" target="_blank" class="link--twitter"title="Share on Twitter"><span class="tooltip-toggle" data-tooltip="Tweet this quote"><i class="icon-twitter fa fa-twitter" aria-hidden="true"></i></span></a>
</div>
</blockquote>
最佳答案
Twitter 已经有一段时间了 updated its share link 。现在有单独的 text
和 url
参数:
https://twitter.com/intent/tweet?text=text+to+share&url=https://example.org
专业提示:您还可以提供以逗号分隔的标签!
https://twitter.com/intent/tweet?hashtags=one,two,three&text=&url=
关于javascript - Twitter 共享链接在移动设备上不起作用,但在桌面设备上可用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37665586/