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 html5
$link$– blade19899 Feb 16 at 0:33<meta name="description" content="**">. Also when i click on the link, this code is displayed behind it?fb_action_ids=218073591669795&fb_action_types=og.likes&fb_source=aggregation&fb_aggregation_id=288381481237582– blade19899 Feb 17 at 20:48