有没有办法在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>
我做错了什么?
答案 0 :(得分:1)
http://shantacreations.com/facebook_share_old/example_1/share.php/
是的,上面的链接正在运行,因为你想要发挥作用。