Facebook like for every page of my website- clicking Like should share that particular full url, not just website name

StackOverflow https://stackoverflow.com/questions/10991471

  •  13-06-2021
  •  | 
  •  

Question

i want to integrate facebook like button into my website . My website has multiple pages, with multiple products. At present when a user likes my website, only domain name is getting shared like "http://domainname.com" . But,what i want is, if the url is http://domainname.com/products/5 then , if i click like in that page, in the facebook wall, http://domainname.com/products/5 should be shared . What should i do for that ? Thanks

Était-ce utile?

La solution

You need to use OG meta tags in your page header like,

<meta property="og:url" content="${someURL}"/>

Where the someURL is your dynamic URL.

Please read this tutorial for more details

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top