Posted By

jretamal on 08/04/11


Tagged

php page facebook Fan


Versions (?)

Fan Page Verify


 / Published in: PHP
 

Verify if a user is a fan of a page

  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  

You need to login to post a comment.