DISABLE ADBLOCK

ADBlock is blocking some content on the site

ADBlock errore

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

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

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow