Facebook“喜欢”按钮,喜欢其他页面/ URL [英] Facebook "like" button which likes another page/URL

查看:106
本文介绍了Facebook“喜欢”按钮,喜欢其他页面/ URL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个链接列表,在每个单独的页面上都有一个喜欢按钮喜欢那个页面。但是,我想在列表中的每个链接旁边都有一个like按钮,它会像它旁边的链接的URL一样(就像点击链接,然后点击like按钮)。

I have a list of links and on each individual page there's a "like" button to "like" that page. But I want a "like" button next to each link in the list which will like the URL of the link next to it (just like it would if you clicked on the link and then the "like" button).

要在每个单独页面上创建按钮,我使用以下代码:

To create the button on each individual page I use the following code:

<script>
window.fbAsyncInit = function()
{
     FB.init({appId: '*****', status: true, cookie: true, xfbml: true});
};
</script>

<div class="share_button btn_fb">
<fb:like layout="button_count" font="tahoma"></fb:like>
</div>


推荐答案

您可以使用iframe版本的Like Button,而不是FBML。 iframe要求您将URL作为查询字符串的一部分传递。

You can use the iframe version of the Like Button, rather than FBML. The iframe requires that you pass the url as part of the query string.

您可以生成iframe代码这里

You can generate the iframe code here.

这篇关于Facebook“喜欢”按钮,喜欢其他页面/ URL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆