nygardk / react-share

Social media share buttons and share counts for React
MIT License
2.64k stars 433 forks source link

Facebook sharing not use provided parameters #302

Open rhpereda opened 4 years ago

rhpereda commented 4 years ago

Hello guys, i'm trying to use the react-share library to share my application in social networks. My app is a basic and simple reactjs application with several routes with query params. The idea is to share the routes by providing dynamically the required params. This is already done, but still the shared content is not the desire one. I'm doing this:

<FacebookShareButton url={getShareUrl()} quote={props.title}>
     <FacebookIcon size={40} borderRadius={10}/>
</FacebookShareButton>

but always trying to retrieve the info from the main page, regarding i set this onto the page:

<MetaTags>
    <title>{props.identityData.title}</title>
    <meta name="description" content={props.identityData.description}/>
    <meta name="keywords" content={props.identityData.keywords}/>
    <meta property="og:url" content={props.identityData.url}/>
    <meta property="og:type" content={props.identityData.type}/>
    <meta property="og:title" content={props.identityData.title}/>
    <meta property="og:description" content={props.identityData.description}/>
    <meta property="og:image" content={props.identityData.imageUrl}/>
    <meta property="og:image:secure_url" content={props.identityData.imageUrl}/>
</MetaTags>

Thanks in advance

mamiu commented 1 year ago

Facebook doesn't accept parameters to the sharer.php anymore.