0

So, I'm currently using react-share to share certain pages on my app to Faceboook.

In terms of sharing my pages to Facebook, it works fine. I can post my link on Facebook and when I click on it, it redirects me to whatever url is embedded on FacebookShareButton:

enter image description here

However, I can't seem to be able to add an image to that link. I also can't seem to add a description to my FacebookShareButton.

Is there a way to not only attach an image to my share post, but also a description as well?

This is what I have for my home page:

  <div className='m-5 p-3'>
     <h3>SHARE THIS SITE!!!</h3>
     <FacebookShareButton
        title='MY TITLE HERE'
        description='DESCRIPTION OF MY SITE'
        url='**https://SOCIAL-SHARE-APP.netlify.app/**'
     >
        <FacebookIcon></FacebookIcon>
     </FacebookShareButton>
  </div>

How do I an an image?

I also want to make it so that I can add a different image depending on which page I share.

In other words, if the url on my FacebookShareButton redirects to 'https://SOCIAL-SHARE-APP.netlify.app/', there would be a different image and description attached to the share link (as well as a different description) than a url that redirects to 'https://SOCIAL-SHARE-APP.netlify.app/sign-up' or another page.

Thanks.

I used the npm package react-share and it seems to work fine as far as posting on Facebook and redirecting to the correct url, but that link that I'm sharing kind of looks "boring". I just want to be able to attach and image to it and I cannot seem to be able to do that with react-share.

dho1115
  • 11
  • 1

0 Answers0