我有一个嵌入了 youtube 视频的网页。我需要在此页面上添加一个 facebook 分享按钮来分享 youtube 视频(不分享网页,只分享视频)
我添加了以下 HTML 代码并设法完成它。
<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>
但是它只是添加了一个共享按钮的图像,这不是您在其他地方真正看到的。(这里的位置是一个变量,其中包含我的 youtube 视频的 url)
当我使用此代码时
<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>
我得到了正确的 fb 分享按钮,但它没有分享视频,而是分享了我网页的网址。
有人可以帮我解决这个问题。
提前致谢。