Question

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?

Was it helpful?

Solution

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.

OTHER TIPS

Facebook like buttons doesnt use parameters in url. User this: http://developers.facebook.com/tools/lint/ to check for info and errors

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