Share Buttons - Specifying the URL/Link to be Shared

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:

  1. "data-link" attribute
    <div class='shareaholic-canvas'
         data-app='share_buttons' 
         data-link='https://blog.example.com/' 
         data-app-id="xxx" ></div>
    Note: if you're using either our WordPress or Drupal plugin, data-link is set automatically.
  2. Shareaholic URL Meta Tag
    <meta name="shareaholic:url" content="https://blog.example.com/" />
    Note: if you're using either our WordPress or Drupal plugin, this meta tag is set automatically.
  3. Canonical Meta Tag
    <link rel="canonical" href="https://blog.example.com/" />
  4. Open Graph URL Meta Tag
    <meta name="og:url" content="https://blog.example.com/" />
  5. 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.

Was this article helpful?
7 out of 15 found this helpful