![](/img/trans.png)
[英]Twitter & Facebook Custom Share Buttons With Dynamic URL & Title
[英]Share Dynamic Data on Facebook and Twitter
有什么方法可以在Facebook和Twitter上共享我頁面上的一些動態數據嗎?
我使用靜態數據嘗試了此代碼,並且可以正常工作,但是我無法動態應用它。
對於Twitter:
<a href="http://twitter.com/share"
data-url="http://your.url.com/yourdynamicpage"
class="twitter-share-button"
data-text="What should I share?"
data-count="horizontal">Tweet</a>
對於Facebook:
<a href="javascript:window.location=%22http://www.facebook.com/sharer.php?u=%22+encodeURIComponent(document.location)+%22&t=%22+encodeURIComponent(document.title)" title="Share on Facebook..."><img src="/path/to/your/image/" width="12" height="12" alt="alt" /></a>
我究竟做錯了什么?
http://shantacreations.com/facebook_share_old/example_1/share.php/
是的,上面的鏈接正在發揮作用,如您所願。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.