Posted By

thiagotargino on 10/25/11


Tagged

facebook like fanpage


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

Net-Freak


Like/Dislike Fanpages Facebook


 / Published in: PHP
 

Redirecionamento Like/Dislike para Fanpages do Facebook.

  1. <?php
  2. $signed_request = $_REQUEST["signed_request"];
  3.  
  4. list($encoded_sig, $payload) = explode('.', $signed_request, 2);
  5. $data = json_decode(base64_decode(strtr($payload, '-_', '+/')), true);
  6. // var_dump($data);die();
  7. $pageLiked = $data['page']['liked'];
  8. if($pageLiked){
  9. header('Location: like-on.html');
  10. }
  11. else{
  12. header('Location: like-off.html');
  13. }
  14. ?>

Report this snippet  

You need to login to post a comment.