Share Buttons automatically evaluate the webpage they are placed on for signals for the best URL to share.
For non-index pages (ie. pages that contain a single piece of content for sharing), the following signals are evaluated in this specific order:
-
"data-link" attribute
Note: if you're using either our WordPress or Drupal plugin, data-link is set automatically.<div class='shareaholic-canvas' data-app='share_buttons' data-link='https://blog.example.com/' data-app-id="xxx" ></div>
-
Shareaholic URL Meta Tag
Note: if you're using either our WordPress or Drupal plugin, this meta tag is set automatically.<meta name="shareaholic:url" content="https://blog.example.com/" />
-
Canonical Meta Tag
<link rel="canonical" href="https://blog.example.com/" />
-
Open Graph URL Meta Tag
<meta name="og:url" content="
https://blog.example.com/
" /> - The URL displayed in the web browser address bar
For index pages, it is best to use the data-link attribute when placing Share Buttons on a webpage. If the data-link attribute is not utilized, Share Buttons automatically determines the URL to be shared based on a number of factors, including page structure. Note: if you're using either our WordPress or Drupal plugin, this is taken care of automatically for you.