Like/Dislike Fanpages Facebook


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

Redirecionamento Like/Dislike para Fanpages do Facebook.


Copy this code and paste it in your HTML
  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


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.