我的工作代码推文文字在这里正确把页面上的资料Tweet按钮,允许用户预览鸣叫然后提交它:使用分享Tweet按钮 - 链接不会出现在所有
<a href="https://twitter.com/share" class="twitter-share-button"
data-text="Check out this URL! "
data-url="www.OurSite.com/UX1ab7"
data-via="OurSite" data-size="large" data-count="none">Tweet</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];
if(!d.getElementById(id)) {
js=d.createElement(s); js.id=id;
js.src="//platform.twitter.com/widgets.js";
fjs.parentNode.insertBefore(js,fjs);}
}
(document,"script", "twitter-wjs");
</script>
如果您召回(看看你自己的推文为例),你可以粘贴到您的鸣叫功能的链接 - 一个链接,你的Twitter追随者之一,在阅读您的鸣叫,会发现
'hey, I see an embedded URL here in this tweet -- I can tell it's a link
because it looks like a URL and its text color is a different color from
the other text in the tweet. Here let me click on that url in the tweet
and -- HEY it works, that blue-colored text IS a link, I just jumped to www.xyx.com.'
我的印象在我的代码中,'data-url'设置应该是可见的,特殊的y色链接网址显示在推文的正文中。那么它不适合我的情况。
在我上面的代码中,data-url =“www.OurSite.com/UX1ab7”在Tweet中根本看不到。 和更改“数据文本”来
data-text="Check out this URL! www.OurSite.com/UX1ab7"
上面的代码生成的鸣叫是:看看这个网址! www.OurSite.com/UX1ab7
但即使'www.OurSite.com/UX1ab7'URL出现在推文中 - 它不是链接,只是文本,并且 与其余文本颜色相同的推文。
在上面的鸣叫www.OurSite.com/UX1ab7文本不
样子
行为像一个可点击的链接
这只是文字。
如何使用Tweet按钮获取Tweet按钮以显示可点击的URL链接? 我认为'data-url'会使链接可见并且可点击,但它不会。
尝试添加http:// – 2012-03-12 13:24:31
您是否曾尝试在URL前添加“http://”?Twitter可能会验证'data-url'属性并丢弃无效输入。 – RikkusRukkus 2012-03-12 13:26:20
想到两件事:你可能应该在协议(http)的前面,并且分开文本和链接,是不是有data-url属性? – 2012-03-12 13:26:33