Created
July 20, 2012 19:03
-
-
Save hedcler/3152600 to your computer and use it in GitHub Desktop.
Verify if user like my Facebook FãPage
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$signed_request = $_REQUEST["signed_request"]; | |
list($encoded_sig, $payload) = explode('.', $signed_request, 2); | |
$data = json_decode(base64_decode(strtr($payload, '-_', '+/')), true); | |
if (empty($data["page"]["liked"])) { | |
echo "You are not a fan!"; | |
} else { | |
echo "Welcome back fan!"; | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment