kafe.plugin.social

Class

Version 0.2.1

Social tools

Source: dist/plugin/social.js

Methods

initGenuineButtons

Initialize genuine buttons functionality

initGenuineButtons
  • options

Parameters:

  • [options] Object Optional

    Options

    • [lang] Object Optional

      Display button language. Possible values are en, fr or by default is kafe.env.lang.

    • [url] Object Optional

      Specific url sharing. By default is the current url.

    • [text] Object Optional

      Specific text sharing. By default is the browser title.

    • [size] Object Optional

      Display button size. Possible values are small and large. Only work with Twitter, Google + and Pinterest.

    • [counter] Object Optional

      Orientation and visibility of counter. Possible values are none, horizontal and vertical. By default is horizontal.

    • [media] Object Optional

      Image url for Pinterest sharing. By default is the link to the tag image_src in the head of the document.

Example:

<span data-kafesocial-action="genuine" data-kafesocial-network="facebook" data-kafesocial-options='{ "appid":"1514943792075126" }'></span>
					<span data-kafesocial-action="genuine" data-kafesocial-network="houzz" data-kafesocial-options='{ "hzid":"26660", "url":"http://www.flickr.com/photos/kentbrew/6851755809/", "media":"http://farm8.staticflickr.com/7027/6851755809_df5b2051c9_z.jpg" }'></span>
					<span data-kafesocial-action="genuine" data-kafesocial-network="twitter"></span>
					<span data-kafesocial-action="genuine" data-kafesocial-network="linkedin"></span>
					<span data-kafesocial-action="genuine" data-kafesocial-network="googleplus"></span>
					<span data-kafesocial-action="genuine" data-kafesocial-network="pinterest" data-kafesocial-options='{ "url":"http://www.flickr.com/photos/kentbrew/6851755809/", "media":"http://farm8.staticflickr.com/7027/6851755809_df5b2051c9_z.jpg" }'></span>
					<script>
					    $(function() {
					        kafe.plugin.social.initGenuineButtons();
					    });
					</script>
					

initShareButtons

Initialize share buttons functionality

initShareButtons
  • options

Parameters:

  • [options] Object Optional

    Options

    • [lang] Object Optional

      Display popup sharing language. Not fully supported by all social networks. Possible values are en, fr or by default is kafe.env.lang.

    • [url] Object Optional

      Specific url sharing. By default is the current url.

    • [text] Object Optional

      Specific text sharing. By default is the browser title.

    • [media] Object Optional

      Image url for Pinterest sharing. By default is the link to the tag image_src in the head of the document.

Example:

<span data-kafesocial-action="share" data-kafesocial-network="facebook">Facebook</span>
					<span data-kafesocial-action="share" data-kafesocial-network="twitter"><Twitter/span>
					<span data-kafesocial-action="share" data-kafesocial-network="linkedin">Linkedin</span>
					<span data-kafesocial-action="share" data-kafesocial-network="googleplus">Google+</span>
					<span data-kafesocial-action="share" data-kafesocial-network="pinterest" data-kafesocial-options='{ "url":"http://www.flickr.com/photos/kentbrew/6851755809/", "media":"http://farm8.staticflickr.com/7027/6851755809_df5b2051c9_z.jpg" }'>Pinterest</span>
					<script>
					    $(function() {
					        kafe.plugin.social.initShareButtons();
					    });
					</script>