The tweet button allows a user to tweet about the specific content on the page - usually sending some sample text and the url for twitter to then interpret into a twitter card.
This can be invoked via a button or through JavaScript
If we use the default .twitter-share-button class then the Twitter JS will override the control and add the Twitter button and suck elements from data- attributes.
To style the button replace .twitter-share-button with .twitter
= codeBlender "tweet-button", "social/twitter/tweet-button"
<a class='twitter' data-lang='translation missing: en.twitter.locale' data-size='default' data-url='http://codeblender.net' href='https://twitter.com/intent/tweet?url=http://codeblender.net&lang=translation missing: en.twitter.locale' ng-click='root.twitterShare()'>
<span class='fa fa-twitter-square fa-fw'></span>
</a>
= codeBlender "tweet-button", "social/twitter/tweet-button", { id: "twitterShare", url: "http://drykiss.com/", text: "Tweet", type: "javascript" }
<a href="javascript:;" class="twitterShareButton" data-url="http://drykiss.com/" data-text="Tweet"><span class='fa fa-twitter-square fa-fw fa-3x'></span>
</a>
Title | URL |
---|---|
Tweet Button | https://dev.twitter.com/docs/tweet-button |
Task | Date |
---|---|
Provide a sample of the JS version - using the promises | |
Complete with the full set of parameters |