从Iframe Like Button Plugin重新加载页面

问题描述 投票:0回答:1

我们在Facebook上使用Iframe Type应用程序。

目前,我们在Iframe Canvas页面(渲染页面)中使用了以下Like按钮代码。

<iframe   id="theiframe"    src="http://www.facebook.com/plugins/like.php?href=http%3a%2f%2fwww.facebook.com%2fpages%2fRp9%2f151605171570927%3fsk%3dapp_196290923727494&layout=standard&show_faces=true&width=450&action=like&colorscheme=light&height=80" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:330px; height:26px; padding-top:5px; padding-left:5px;" allowTransparency="true"></iframe>

当用户点击“赞”时,我们要为“喜欢”的内容重新加载页面。

但是,当我们使用代码时,我们没有得到Like Button的任何事件。

在以下链接http://developers.facebook.com/docs/reference/plugins/like/详细信息被给予跟踪按钮事件。但那是xFBML应用程序。

我们正在使用Iframe应用程序。关于Iframe选项,上面的链接没有任何细节。

谁能帮助我们解决这个问题?

提前致谢,

Ashish Shukla

facebook facebook-graph-api facebook-like reload
1个回答
0
投票

您可以使用javascript来监听当有人点击类似按钮时触发的edge.create事件。

FB.Event.subscribe文档:https://developers.facebook.com/docs/reference/javascript/FB.Event.subscribe/

我认为它不适用于iframe按钮只有在xfbml或HTML5中创建like按钮时才会起作用,如下所示:

<div class="fb-like" data-send="true" data-width="450" data-show-faces="true"></div>
© www.soinside.com 2019 - 2024. All rights reserved.