如何添加“赞"我的FaceBook登陆标签上的按钮? [英] How to Add a "Like" Button to my FaceBook Landing Tab?

查看:121
本文介绍了如何添加“赞"我的FaceBook登陆标签上的按钮?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

已设置我的FaceBook页面",以便向尚未喜欢"该页面(并尝试查看该页面)的用户显示特定选项卡的内容,而不是默认的墙壁"视图.

My FaceBook Page is setup so that users who have not "Liked" the page yet (and attempt to view the page) are presented with the content of a particular tab instead of the default "wall" view.

这些用户到达的选项卡包含我创建的应用程序.这是一个简单的应用程序,列出了有关业务的信息.

The tab that these users arrive at contains an application I made. It is a simple application that lists information about the business.

应用程序正在使用"I Frame"渲染方法(在应用程序的画布"设置中).

The application is using the "I Frame" render method (in the application's "Canvas" settings).

我的目标是在应用程序中添加FaceBook"Like Button"或"Like Box".

这样做的目的是编写一条鼓励访问者喜欢" FaceBook页面(而不是应用程序)的消息.

The purpose of this is to write a message that encourages visitors to "Like" the FaceBook Page (not the application).

我已经尝试过使用LikeBooks和Like Boxs的FaceBook代码生成器,但是它不起作用.当我在FaceBook中查看我的应用程序时,添加代码的位置没有任何内容.

I've tried the FaceBook code generators for Like Buttons and Like Boxes, but it does not work. When I view my application in FaceBook, there is "nothing" in the location where I added the code.

在应用程序内部具有赞"按钮似乎是许多FaceBook页面所有者想要的东西.有什么办法可以做到这一点?

Having a "Like" button inside of an application seems like something that many FaceBook page owners would want. Is there any way to accomplish this?

推荐答案

首先,请确保页面以html模式而不是FBML加载.

First of all, make sure you page is loaded in html mode instead of FBML.

1,加载FB JS

1, Load the FB JS

<script src="http://connect.facebook.net/en_US/all.js#appId=YOURAPPID&amp;xfbml=1"></script>

2,初始化FB(有时如果没有它就无法工作)

2, Init the FB (sometimes it doesn't work without this)

<script>
FB.init({
    appId:"YOURAPPID",
    xfbml:true,
    status:true,
    cookie:true,
});
</script>

3,将喜欢"按钮放在您想要的位置

3, Put the like button where do you want

<fb:like href="http://www.facebook.com/YOUR_FACEBOOK_PAGE" send="false" layout="button_count" width="90" show_faces="false" font="arial"></fb:like>

会显示类似的内容,但不会刷新页面,因此您必须自己注意流程.

The like will appear, but will not make page refresh, so you have to take care the flow yourself.

这篇关于如何添加“赞"我的FaceBook登陆标签上的按钮?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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