An extension to add asynchronous (lazy/late loading) social media buttons and
widgets to your templates using {{ socialite('SocialNetwork') }}
or {{ socialite({'SocialNetwork': 'variable'}) }}
.
The extension is based on the Socialite JavaScript library by David Bushell and Tom Morton
In the extension's configuration you need to set your Twitter username in the 'twitter_handle' parameter.
For the Twitter feed setup you will need to follow these steps:
- Sign in to twitter.com and visit the widgets section of your settings page
- Click the 'Create new' button
- Copy the data-widget-id number from the box below 'Preview' to your
config.yml
file - Add your Twitter handle and other settings to your configuration
Like this page: {{ socialite('FacebookLike') }}
Like your site's Facebook page: {{ socialite({'FacebookFollow': 'https://www.facebook.com/MyPage'}) }}
+1 this page/article: {{ socialite('GooglePlusOne') }}
Share this page/article on Google+: {{ socialite('GooglePlusShare') }}
Follow your page on Google+: {{ socialite({'GooglePlusFollow': 'https://plus.google.com/u/0/+MyPage/'}) }}
Share page/article on Twitter: {{ socialite('TwitterShare') }}
Mention your Twitter handle in a new tweet: {{ socialite('TwitterMention') }}
Follow your Twitter account: {{ socialite('TwitterFollow') }}
- Note that TwitterFollow has compulsorary settings in config.yml to make it work.
Specify a hashtag for a new tweet: {{ socialite({'TwitterHashtag': 'HashCookies'}) }}
An embedded Twitter timeline: {{ socialite('TwitterEmbed') }}
- Note that TwitterEmbed has compulsory settings in
config.yml
to make it work.
Buffer this page/article: {{ socialite({'BufferAppButton': record.image}) }}
Share on LinkedIn: {{ socialite('LinkedinShare') }}
PinIt on Pinterest: {{ socialite('PinterestPinit') }}
Star a user/organisation's repo on GitHub:
{{ socialite('GitHubStar') }}
(uses setting in config.yml)
or
{{ socialite({'GitHubStar': ['github_user','github_repo']}) }}
Fork a user/organisation's repo on GitHub:
{{ socialite('GitHubFork') }}
(uses setting in config.yml)
or
{{ socialite({'GitHubFork': ['github_user','github_repo']}) }}
Follow a user on GitHub:
{{ socialite('GitHubFollow') }}
(uses setting in config.yml)
or
{{ socialite({'GitHubFollow': 'github_user'}) }}