我的工作代碼推文文字在這裏正確把頁面上的資料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