Search code examples
phpfacebooksdkfacebook-apps

Facebook Pagetab App - user likes


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.

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.

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

Example Before:

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
                )
        )
)

Example After:

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
                )
        )
)

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!

Thanks, Chris.


Solution

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

    (see v2.1 changes)

    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.