Facebook:
window.open('http://www.facebook.com/share.php?u='.concat(encodeURIComponent(location.href)))
Plurk:
window.open('http://www.plurk.com/?qualifier=shares&status=[推] ' .concat(encodeURIComponent(location.href)) .concat(' ') .concat('(') .concat(encodeURIComponent(document.title)) .concat(')'))
Twitter:
window.open('http://twitter.com/home/?status=' .concat(encodeURIComponent(document.title)) .concat(' ') .concat(encodeURIComponent(location.href)))
其中,若是有要設定分享至Facebook頁面的縮圖及內容時,可在head之間加入以下meta及link:
< name='description' content="說明文字" />
< name='title' content="標題" />
<link rel='image_src' href='圖片路徑' />
< name='title' content="標題" />
<link rel='image_src' href='圖片路徑' />
沒有留言:
張貼留言