Open chvillanuevap opened 4 years ago
Adding these parameters to the $supported_services
variable fixes my problem:
$supported_services = array(
...
// added these parameters myself based on https://amp.dev/documentation/components/amp-social-share/#pre-configured-providers
'pinterest' => array(
'data-param-media' => $pinterest_thumb_url,
'data-param-url' => get_permalink( $post->ID ),
'data-param-description' => $post->post_title,
),
...
);
Steps to reproduce the issue
What I expected
I expected an image to be pulled up to share.
What happened instead
No image is displayed for the user to pin.
The Pinterest AMP button needs a
data-param-media
attribute to pull up an image (see https://amp.dev/documentation/components/amp-social-share/#pre-configured-providers). I think the plugin should offer a filter in the functionrender_sharing_html
injetpack/3rd-party/class.jetpack-amp-support.php
for users to be able to add more parameters to the social share buttons.