Geekyvinayak
Geekyvinayak

Reputation: 342

React-share: Pintrest share button not working

i am using react-share library version 5.0.3. i have used pintrest share button but it just opening pintrest page but the shared image is not getting attached there.

sample code:

let link = https://images.pexels.com/photos/45201/kitty-cat-kitten-pet-45201.jpeg

    <PinterestShareButton media={link} url={link}>
            <PinterestIcon size={35} round={true} />
    </PinterestShareButton>

on pintrest it just shows like this enter image description here

How to resolve this or what can be the fix.

Upvotes: 0

Views: 273

Answers (2)

Geekyvinayak
Geekyvinayak

Reputation: 342

This can be fixed by giving description prop to the pintrest button component line this

<PinterestShareButton
          url={link}
          media={link}
         description={"description of the image"}
        >

And then it will open image attached pintrest popup.

Upvotes: 0

amisha
amisha

Reputation: 106

I have created a working button. Could you please check if it's what you need?

code

Upvotes: 0

Related Questions