How to add a Facebook share button for a video on a web page

Dan picture Dan · Mar 5, 2013 · Viewed 8.1k times · Source

I have a YouTube video on my website and want to add Share button then users can share that video on Facebook. (Only video and not the whole site)

Here is my code, which doesn't seem to work:

<a name="fb_share" type="box_count" href="http://www.youtube.com/watch?v=5Fgsi9nw_ME" rel="nofollow" alt="Share">Share</a>
<script src="http://static.ak.fbcdn.net/connect.php/js/FB.Share" type="text/javascript"></script> 

Any idea? Or any other method to add this button on the website?

Answer

sdamashek picture sdamashek · Mar 5, 2013

Have you followed the instructions at the Facebook API page? Just follow the instructions there and you get nice clean code, which can be used to share the video URL and much more.

EDIT: Updated with send button, not like button