沃梦达 / 编程问答 / php问题 / 正文

Facebook Pagetab 应用程序 - 用户喜欢

Facebook Pagetab App - user likes(Facebook Pagetab 应用程序 - 用户喜欢)

本文介绍了Facebook Pagetab 应用程序 - 用户喜欢的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 Facebook SDK,我们创建了一个可以根据需要运行的应用程序.我们可以在 PHP 中使用 $FacebookSDK->getSignedRequest(),它会返回一个包含 pages->liked 的对象,这使我们能够确定用户是否喜欢页面与否.

I'm using the Facebook SDK and we created an app which worked just as we needed. We could $FacebookSDK->getSignedRequest() in PHP and it would respond with an object that included pages->liked which allowed us to determine if the user likes the page or not.

无论如何,我们已经创建了一个完全相同的应用程序(唯一的区别是这个应用程序比旧应用程序新大约 3 个月)并且 like 属性已完全消失,我无法获取我的动手吧.

Anyway, we have created an exact duplicate application (the only difference being that this app is about 3 months newer than the old) and the like property has completely disappeared and I can't get my hands on it.

任何想法为什么会发生这种情况 - Facebook 是否进一步限制了他们的 SDK 并为新应用删除了这个属性?

Any ideas why this is happening - has Facebook restricted their SDK yet further and removed this property for new apps?

之前的示例:

stdClass Object
(
    [algorithm] => HMAC-SHA256
    [issued_at] => 1408626697
    [page] => stdClass Object
        (
            [id] => ************
            [admin] => 1
            [liked] => 1
        )

    [user] => stdClass Object
        (
            [country] => gb
            [locale] => en_GB
            [age] => stdClass Object
                (
                    [min] => 21
                )
        )
)

之后的示例:

stdClass Object
(
    [algorithm] => HMAC-SHA256
    [issued_at] => 1408625335
    [page] => stdClass Object
        (
            [id] => ************
            [admin] => 1
        )

    [user] => stdClass Object
        (
            [country] => gb
            [locale] => en_GB
            [age] => stdClass Object
                (
                    [min] => 21
                )
        )
)

请注意,这里唯一缺少的是 likes 属性,所以我无法判断用户是否喜欢我们的页面标签!Facebook 正在努力开发这些天!

Notice that the only thing missing here is the likes property so I can't tell if the user likes our page tab or not! Facebook is doing my nut in to develop on these days!

谢谢,克里斯.

推荐答案

https://developers.facebook.com/docs/apps/changelog

(参见 v2.1 更改)

(see v2.1 changes)

Fan-/Like-Gates 不再可能,并且根据平台政策是不允许的.在 2014 年 11 月 5 日之后,旧应用将始终在 signed_request 参数中返回true".

Fan-/Like-Gates are not possible anymore, and not allowed according to the Platform Policy. Old Apps will always return "true" in the signed_request parameter after 5th of November 2014.

这篇关于Facebook Pagetab 应用程序 - 用户喜欢的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!

本文标题为:Facebook Pagetab 应用程序 - 用户喜欢

基础教程推荐