Facebook Like Count在同一页面上与iframe和JS SDK不同!为什么?

时间:2012-03-20 19:17:56

标签: facebook facebook-like

问题:

当我们从Facebook iFrame(如按钮代码)切换到HTML5 JS SDK按钮时,我们的页面计数完全重置了! (400多个喜欢在某些情况下变为0)。我们已经等了将近一周,并且通过棉绒推动了连接,并且之前的数值没有增加。


验证:

当我们在页面上同时运行两种类型的按钮时,iframe仍会显示较大/原始的类似计数。 Test link (will only have 3 buttons for the next ~12 hours)

屏幕截图:3 Like buttons on the same page (iframe, JS-SDK w/ url encoding & JS-SDK standard)


喜欢按钮代码:

我想也许是因为url编码,所以第二个和第三个按钮之间的差异是网址上的url编码。第一个按钮是iframe。

    <td><iframe src="//www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.team-bhp.com%2Fforum%2Fshowthread.php?t=$thread[threadid]&amp;send=false&amp;layout=button_count&amp;width=450&amp;show_faces=false&amp;action=like&amp;colorscheme=light&amp;font=verdana&amp;height=21&amp;appId=106794169377106" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:110px; height:21px;" allowTransparency="true"></iframe>
    </td>

    <td align="left" valign="middle" style="width: 90px">
        <div class="fb-like" data-href="http%3A%2F%2Fwww.team-bhp.com%2Fforum%2Fshowthread.php?t=$thread[threadid]" data-send="false" data-layout="button_count" data-width="90" data-show-faces="false" data-font="tahoma"></div>
    </td>

    <td align="left" valign="middle" style="width: 90px">
        <div class="fb-like" data-href="http://www.team-bhp.com/forum/showthread.php?t=$thread[threadid]" data-send="false" data-layout="button_count" data-width="90" data-show-faces="false" data-font="tahoma"></div>
    </td>

元标记:

元标记在facebook linter / debugger中显示正常(虽然“og:image”,“og:description”和“og:url”未明确指定)

<meta property="og:title" content="The 2012 Budget &amp; the Indian Car Scene : All you need to know - Team-BHP" />
<meta property="og:type" content="article" />
<meta property="og:site_name" content="Team-BHP.com" />
<meta property="fb:admins" content="1504944662" />
<meta property="fb:app_id" content="106794169377106" />

帮助!

为什么会这样?

iFrame是否也展示了在facebook上积累的喜欢?

“app_id”是否仅对JS-SDK按钮突然生效?

任何见解都会受到赞赏!!

谢谢, [R

1 个答案:

答案 0 :(得分:2)

我看了一下你提供的测试链接的来源,iframe src有这个值:

//www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.team-bhp.com%2Fforum%2Findian-car-scene%2F117538-2012-budget-indian-car-scene-all-you-need-know.html

与其他两个有

的插件相反
http://www.team-bhp.com/forum/showthread.php?t=117538
or
http%3A%2F%2Fwww.team-bhp.com%2Fforum%2Fshowthread.php?t=117538

作为 data-href

看起来iframe使用漂亮的网址而其他两个使用短版本,而且由于您使用的是不同的网址,因此会得到不同的结果。