Facebook sends blank signed request when secure browsing is enabled

I just want to ask a question about Facebook "signed_request". Its return value is null when secure browsing is enabled on the facebook user account. I used this code ... `

    <?php
    // Create our Application instance (replace this with your appId and secret).
    $facebook = new Facebook(array(
      'appId'  => $applicationID,
      'secret' => $applicationSecret,
    ));

    $signed_request = $facebook->getSignedRequest();

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

    if ($like_status) 
    {
    echo "You like us";
    }
    else
    {
    echo "You not like us";
    }


?>

thank...

+5
source share
1 answer

The first step is to print the data obtained from facebook:

echo '<pre>';
print_r($_GET);
print_r($_POST);
echo '</pre>';

When secure browsing is enabled in the facebook user account, facebook will try to download your application from https (you must set this in the application settings). Is your application also located at https?

+2
source

All Articles