1

有没有办法为每个 FB 分享按钮设置特定的 og 元标记?

<meta property="og:title" content="Youtube video 1" />
<meta property="og:description" content="First link to a youtube video" />
<meta property="og:image" content="http://www.plasticoperator.com/youtube_logo_black.png" />


<a href="http://www.facebook.com/sharer.php?u=http://www.youtube.com/watch?v=FXPXHK7I1iQ" onClick="return fbs_click(626, 305)" target="_blank" >SHARE 1</a>

    <a href="http://www.facebook.com/sharer.php?u=http://www.youtube.com/watch?v=FXPXHK7I1iQ" onClick="return fbs_click(626, 305)" target="_blank" >SHARE 2</a>

    <a href="http://www.facebook.com/sharer.php?u=http://www.youtube.com/watch?v=FXPXHK7I1iQ" onClick="return fbs_click(626, 305)" target="_blank" >SHARE 3</a>

谢谢

4

1 回答 1

1

中没有元标记<head>,只需将其与 sharer.php 内联编写即可:

Stichoza 更新的代码

<a
    id="fb-share"
    style='text-decoration:none;'
    type="icon_link"
    onClick="window.open(
        'http://www.facebook.com/sharer.php?s=100&p[title]=YOUR_TITLE&p[summary]='
            + 'YOUR_DESCRIPTION&p[url]=YOUR_URL&p[images][0]=YOUR_IMAGE',
        'sharer',
        'toolbar=0,status=0,width=580,height=325');"
    href="javascript: void(0)"
>Share</a> 
于 2013-02-11T20:39:09.443 回答