Topic-icon How to getSignedRequest

Active Subscriptions:

None
9 years 7 months ago #47013 by Ivan
How to getSignedRequest was created by Ivan
Hi,

Using the JFBConnect Library or Utilities. Is it possible to getSignedRequest . I would like to check if the user has liked my page from withing the Page Tab url eg.


$app_id = "apid";
$app_secret = "appsecret";
$facebook = new Facebook(array(
        'appId' => $app_id,
        'secret' => $app_secret,
        'cookie' => true
));


$signed_request = $facebook->getSignedRequest();

$like_status = $signed_request["page"]["liked"];

// If a fan is on your page
if ($like_status) {
$a = file_get_contents("https://mysite/likepage");
echo ($a);
} else {
// If a non-fan is on your page
$a = file_get_contents("https://mysite.com/reveal");
echo ($a);
}

The topic has been locked.
Support Specialist
9 years 7 months ago #47024 by alzander
Replied by alzander on topic How to getSignedRequest
You can get the Signed Request using JFBConnect. However, it doesn't matter. Facebook removed the ability to detect if a user has Like'd the Facebook Page as of August 7th. Please read their Graph API v2.1 blog post for more info. Specifically:

The liked field will no longer be returned in the page property of the signed_request object for Page Tab apps created from today onwards. For apps created before today, from November 5, 2014 (90 days from today), the liked property will always return true regardless of whether or not the person has liked the page.

I hope that helps, even if it's not what you were looking to hear.

Thanks,
Alex
The topic has been locked.