yajepanta / maqay-agenda-ambiental

https://agendaambiental.info
0 stars 3 forks source link

Compartir contenido distinto por cada post en redes social #5

Open unjust opened 3 years ago

unjust commented 3 years ago

Necesitmas una manera a cambiar el contenido con casda post. Normalmente es posible si tienes una pagina individual de cada contenido que tiene su propio metatags.

https://css-tricks.com/essential-meta-tags-social-media/ https://dev.to/burhanahmeed/dynamic-rendering-simple-solution-for-spa-when-shared-on-social-media-amd

pero si tenemos una pagina general por mas de un post, hay una manera a cambiar los metatags antes de compartir?

unjust commented 3 years ago

https://www.npmjs.com/package/react-share

npmnpm react-share Social media share buttons and share counts for React.

quiza podemos utilizar beforeOnClick (() => Promise/() => void): Takes a function that returns a Promise to be fulfilled before calling onClick. If you do not return promise, onClick is called immediately. de react-share para cambiar los meta tags dinamicamente

unjust commented 3 years ago

https://www.npmjs.com/package/react-share

npmnpm react-share Social media share buttons and share counts for React.

quiza podemos utilizar beforeOnClick (() => Promise/() => void): Takes a function that returns a Promise to be fulfilled before calling onClick. If you do not return promise, onClick is called immediately. de react-share para cambiar los meta tags dinamicamente

https://stackoverflow.com/a/36073112/274949