Add share buttons to your website, enabling visitors to earn Bitcoin for sharing your pages.
Create a campaign that will be used to pay visitors who promote your site.
If you plan to create share buttons for more than one page, you will want to make sure your campaign target URL is your domain root (https://yourdomain.com) without any specific page or query parameters. This will make it a domain-wide campaign, allowing promoters to create links for any page on your website. For more information on that, see the campaign creation guide.
data-button-id - Any unique string used to identify this widget.
data-widget-type - 'banner' or 'share-button'. If ommitted, 'banner' will be assumed.
data-target-url - URL the share button should create a shortlink for. If omitted this will be the current page.
data-get-link-text - Text to show when button is ready to get a share link.
data-done-text - Text to show when button is done getting share link.
data-loading-text - Text to show when button is fetching the share link.
data-auth-text - Text to show when the user is not logged into TonicPow.
data-error-text - Text to show when there is an error fetching the share link.
data-width - Force the iframe size to this width.
data-height - Force the iframe size to this height
data-background-color - Force the iframe background color
Step 3: Initialize the button
Now that the HTML has been added, you can initialize the button with some options, like callback handlers by calling the `shareButton` constructor, and passing the corresponding `data-widget-id` along with the configuration options.