Fan Page Verify


/ Published in: PHP
Save to your folder(s)

Verify if a user is a fan of a page


Copy this code and paste it in your HTML
  1. <?php
  2. $signed_request = $_REQUEST["signed_request"];
  3. list($encoded_sig, $payload) = explode('.', $signed_request, 2);
  4. $data = json_decode(base64_decode(strtr($payload, '-_', '+/')), true);
  5.  
  6. if (empty($data["page"]["liked"])) {
  7. echo "No eres fans!";
  8. } else {
  9. echo "Ya eres fans!";
  10. }
  11. ?>

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.