I have used the following code to use FB Like on my website…but clicking on like posts this to FB “Jonny likes http://www.site.com“ but not the actual url of the page which was liked i.e “www.site.com/reports/1”.
I have placed this code in the master file…
<div id="fb-root"></div>
<script>(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js.src = "//connect.facebook.net/en_US/all.js#xfbml=1";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
and this in the respective pages….
<div class="fb-like" data-href="http://citizen.tricedeals.com" data-send="true" data-width="450" data-show-faces="false" data-font="verdana"></div>
Code Behind
HTML in Master Page