SNSメディア別シェアボタンを独自実装する場合のURLとタイトルの設定

aタグなどで実装する場合

copy

  • Snow MonkeyのURLコピー機能から要素のみを抜き出し
  • マウスカーソルを指にするのはCSS等で調整必要。
<span class="wp-share-button--copy" data-title="[タイトル]" data-url="[url]" data-hashtags="">コピー</span>

Twitter

<a href="https://twitter.com/share?url=[URL]&text=[タイトル]" target="_blank">ツイート</a>

WEIBO

<a href="http://service.weibo.com/share/share.php?url=[url]&title=[タイトル]" target="_blank">weibo</a>

LinkedIn

OGPからタイトルなどは自動的にLinkdin側で取得されるの渡すのはURLだけでOK

<a href="https://www.linkedin.com/sharing/share-offsite/?url=[url]" target="_blank">linkd in</a>

Facebook

<a href="https://www.facebook.com/sharer/sharer.php?u=[url]" target="_blank">シェア</a>

LINE

<a href="https://social-plugins.line.me/lineit/share?url=[url]&text=[タイトル]" target="_blank">LINE</a>