Facebook检查用户“喜欢”这一页 [英] Facebook Check if user "Liked" the page

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

问题描述

我为公司制作了一些Facebook FBML Canvas页面(Facebook认为这些应用程序是应用程序),他们要求喜欢该页面的用户将被重定向到另一个页面,或者页面将使用AJAX显示不同的内容。

I made a few Facebook FBML Canvas pages (Facebook considers these to be Applications) for a company, and they requested that users who "Like" the page would be redirected to another page, or the page will display different content with AJAX.

我浏览了Facebook开发人员文档,但我找不到如何做的线索

I went through the Facebook Developers Documentation, but I can't find a clue on how to do it.

推荐答案

如果您正在处理facebook应用程序标签页,以下代码可帮助您找到 isfan 状态

If you are dealing with facebook app tab page, the following code helps you to find isfan status

$signed = parse_signed_request($_REQUEST['signed_request'], 'YOUR-APP-SECRET');
if ($signed['page']['liked'] == 1) {
    $fan = true;
} else {
    $fan = false;
}

访问

Visit this link for demo and source code.

这篇关于Facebook检查用户“喜欢”这一页的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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