Amphtml: amp-addthis: Does not share the canonical Url

Created on 13 Jun 2018  路  6Comments  路  Source: ampproject/amphtml

Reported by: @pacoesni

Not sharing the canonical URL with AddThis extension for AMP.

Ok, here is the thing. I've already implement AddThis extension on AMP for WP template. Everything goes fine except when trying to share. I don't want my users to share /amp/ links. So I get into the custom attributes and modify like this:

<amp-addthis
    width="320"
    height="70"
    data-pub-id="my_pub_id"
    data-widget-id="widget_id"
    data-share-url="<?php echo wp_kses_data( get_permalink() ); ?>">
  </amp-addthis>

I thought that 'data-share-url' would solve my request but it didn't. This actually gives me the canonical URL but AddThis extension didn't use it when trying to share. What I'm missing?

Check this example: https://www.tekcrispy.com/2018/05/31/fosil-madre-lagartos/amp/

/to @dmvjs

Bug

Most helpful comment

Hi @pacoesni

It looks like right now data-url (not data-share-url) should do what you expect. This applies to data-share-title and any other data-share- params as well. We are updating our documentation and code soon but I wanted to give you a heads up. Please let me know if this resolves your issue and sorry for the delay!

All 6 comments

Hi @pacoesni

It looks like right now data-url (not data-share-url) should do what you expect. This applies to data-share-title and any other data-share- params as well. We are updating our documentation and code soon but I wanted to give you a heads up. Please let me know if this resolves your issue and sorry for the delay!

I am also interested in this bug, which becomes very annoying when the page is delivered through Google's CDN; the extension gets an address such as
https://www-example-com.cdn.ampproject.org/v/s/www.example.com/address-of-the-amp-page.html?amp_js_v=0.1&usqp=mq331AQECAEoAQ%3D%3D

@dmvjs Now is working smoothly. Thank you very much. AddThis it is an awesome plugin for AMP.

@dmvjs Thank you, I confirm it now works here too, using data-url.

Thanks @dmvjs and @pacoesni.

Closing the issue as resolved.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

gmajoulet picture gmajoulet  路  3Comments

radiovisual picture radiovisual  路  3Comments

aghassemi picture aghassemi  路  3Comments

sryze picture sryze  路  3Comments

Download picture Download  路  3Comments