Template Guides

Rendering Social Buttons

Choose a share button when visitors should share a page, or an ordinary button when linking to a profile or destination. Fetch an object for custom markup, or use its rendering helper for generated HTML.

Calls Used in This Task

craft.socialShare.getShareButton(handle, options)

Returns a Share Button for a given provider.

craft.socialShare.renderShareButton(handle, options)

Returns a rendered Share Button for a given provider.

craft.socialShare.getButton(handle, options)

Returns a Button for a given provider.

craft.socialShare.renderButton(handle, options)

Returns a rendered Button for a given provider.