social_share
Description
Returns a URL to share an item in the newsletter.
Copy
Returns a URL that contains a link that will allow the user to share on a social media site.
For example, you could have separate links to individually “like” each of the articles in your newsletter.
string social_share( string share_mode , string url [, string pinterest_description [, string pinterest_media ]] )
Supported Values For share_mode
Facebook Like – fblike
: When subscribers click the link inside an email, a popup box will encourage them to ‘like’ that article on Facebook.
Code
<a href="{{social_share('fblike', 'http://blog.sailthru.com/post/25024817166/getting-social-with-sailthru')}}">Like this on Facebook</a>
Code Using A Data Feed
<a href="{{social_share('fblike', content[0].url)}}">Like on Facebook</a>Share on Facebook –
fbshare
: Clicking the link provides a Facebook share option with the URL of the campaign pre-populated.
Code
<a href="{{social_share('fbshare', 'http://blog.sailthru.com/post/25024817166/getting-social-with-sailthru')}}">Share on Facebook</a>
Code Using A Data Feed
<a href="{{social_share('fbshare', content[0].url)}}">Share on Facebook</a>Share on Twitter –
twitter
Code
<a href="{{social_share('twitter', 'http://blog.sailthru.com/post/25024817166/getting-social-with-sailthru')}}">Share on Twitter</a>
Code Using A Data Feed
<a href="{{social_share('twitter', content[0].url)}}">Share on Twitter</a>
Prepopulating Hashtags and Tweet @
<a href="{{social_share('twitter', content[0].title+' '+content[0].url+' '+'#sailthru'+' '+'via @Sailthru')}}">Share on Twitter</a>Pin to Pinterest –
pinterest
: Provide the subscriber with the option to either pin with an image, pin without an image, or see the ‘Pin It’ button over an image.
- Pin with Image
<a href="{social_share('pinterest', 'http://pinned-url.com', 'Some description', 'http://media-url.com/image.png')}">Pin it</a>
- Pin without Image
<a href="{social_share('pinterest', 'http://pinned-url.com', 'Some description')}">Pin it without media</a>
- Pin with Image from a data feed
<a href="{{social_share('pinterest', content[0].url, content[0].description, content[0].image)}}">Pin it with media</a>
- Pin without Image from a data feed
<a href="{{social_share('pinterest', content[0].url, content[0].description)}}">Pin it without media</a>
- “Pin It” Button
<img border="0" src="//assets.pinterest.com/images/PinExt.png" title="Pin It" />For example:
<a href="{social_share('pinterest', 'http://pinned-url.com', 'Some description', 'http://media-url.com/image.png')}"> <img border="0" src="//assets.pinterest.com/images/PinExt.png" title="Pin It" /> </a>Share on Tumblr –
tumblr
Code
<a href="{social_share('tumblr', 'http://blog.sailthru.com/post/25024817166/getting-social-with-sailthru')}">Share on Tumblr</a>
Code Using A Data Feed
<a href="{{social_share('tumblr', content[0].url)}}">Share on Tumblr</a>Share on LinkedIn –
linkedin
Code
<a href="{social_share('linkedin', 'http://blog.sailthru.com/post/25024817166/getting-social-with-sailthru')}">Share on LinkedIn</a>
Code Using A Data Feed
<a href="{{social_share('linkedin', content[0].url)}}">Share on LinkedIn</a>Share on Reddit –
reddit
Code
<a href="{social_share('reddit', 'http://blog.sailthru.com/post/25024817166/getting-social-with-sailthru')}">Share on Reddit</a>
Code Using A Data Feed
<a href="{{social_share('reddit', content[0].url)}}">Share on Reddit</a>See also
public_share
, which allows you to share the complete newsletter.