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
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
Hi @gmacar https://www.ampproject.org/docs/fundamentals/discovery, this one may help
@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.
Most helpful comment
Hi @pacoesni
It looks like right now
data-url(notdata-share-url) should do what you expect. This applies todata-share-titleand any otherdata-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!