I have a facebook like button on my website, but the
data-href attribute needs a link to like:
<div class="fb-like share-button fbbutton" data-href="htp://www.example.com/article/1.html" data-send="false" data-layout="button_count" data-width="450" data-show-faces="true"></div>
I have a lot of pages, and would like to copy the code on all my pages, and the code would automatically detect the url it's in. Example:
data-href="$link$" so that i don't need to change the link to that of my pages.
Question: How do i make script, that detects its URL and displays it?
note: Website is written in