A Tweet Button supports pre-populating share text, hashtags, and a Twitter account reference. Associate related Twitter accounts to drive followers.
表示するボタンのサイズ、ツイートカウントの表示、ボタンの配置、その他色々をカスタマイズします。
These visual parameters do not apply to Web Intents, which are styled separately by implementing sites.
<a class="twitter-share-button" href="https://twitter.com/share" data-size="large" data-url="https://dev.twitter.com/web/tweet-button" data-count-url="https://dev.twitter.com/web/tweet-button" data-via="twitterdev" data-related="twitterapi,twitter" data-hashtags="example,demo" data-text="custom share text"> Tweet </a>
<iframe src="https://platform.twitter.com/widgets/tweet_button.html?size=l&url=https%3A%2F%2Fdev.twitter.com%2Fweb%2Ftweet-button&via=twitterdev&related=twitterapi%2Ctwitter&text=custom%20share%20text&hashtags=example%2Cdemo" width="140" height="28" title="Twitter Tweet Button" style="border: 0; overflow: hidden;"> </iframe>
twttr.widgets.createShareButton( "https:\/\/dev.twitter.com\/web\/tweet-button", document.getElementById("tweet-container"), { size: "large", via: "twitterdev", related: "twitterapi,twitter", text: "custom share text", hashtags: "example,demo" } );
<a href="https://twitter.com/share? url=https%3A%2F%2Fdev.twitter.com%2Fweb%2Ftweet-button& via=twitterdev& related=twitterapi%2Ctwitter& hashtags=example%2Cdemo& text=custom%20share%20text"> Tweet </a>