I have a webpage where I've embedded a youtube video. I need to add a facebook share button to this page to share the youtube video (not to share the webpage, only the video)
I added the following HTML code and managed to get it done.
<center><div id='pageshare' title='Share This With Your Friends'><div class='sbutton' id='fb'><image src='http://static.ak.fbcdn.net//rsrc.php//v1//yg//r//yZiDLhSvAE9.gif'></image><a name='fb_share' type='box_count' href='http://www.facebook.com/sharer.php?u="+location+"'>Share</a></div></center>
but then it justs add one image of a share button which is not what you really see in other places. (Here location is a variable which contains the url of my youtube video)
When I used this code
<center><div id='pageshare' title='Share This With Your Friends'><div class='sbutton' id='fb'><a name='fb_share' type='box_count' href='http://www.facebook.com/sharer.php?u="+location+"'>Share</a><script src='http://static.ak.fbcdn.net/connect.php/js/FB.Share?' type='text/javascript'></script></div></center>
I'm getting the correct fb share button, but it's not sharing the video instead it's sharing the url of my webpage.
Can someone help me with this issue.
Thanks in advance.
Have you tried this
<a name="fb_share" type="box_count" href="http://www.facebook.com/sharer.php" rel="nofollow" alt="Share">Share</a>
<script src="http://static.ak.fbcdn.net/connect.php/js/FB.Share" type="text/javascript"></script>