I'm making a site which has a list of videos. Next to each video in the list I want a like button. My like button code looks like this:
<div class="fb-like" data-send="true" data-layout="button_count" data-width="100" data-show-faces="false"></div>
And the URL of the page is
http://dev2-rs-www.doubledip.com/video-play/?vid=aj5pbnNlcnRlZC1mcm9tLXRleHQtaW4tYnVpbGQtZGVwbG95LWFwcGxpY2F0aW9uaWQtb24tZGVwbG95bWVudHIkCxINQWNjb3VudFJlY29yZBgBDAsSC1ZpZGVvUmVjb3JkGAkM
However, the link on my wall is http://dev2-rs-www.doubledip.com/video-play/ without the ?vid= parameter. I also tried adding the data-href attribute, but that didn't do anything. How can I fix this?
Your problem lies with the misuse of the <link rel='canonical'>
element. On the video page, it links to the page without the ?vid parameter, causing it to use that as the final value. Change it to the actual page and it should work fine.