Request data from URL iframe Facebook app


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

Rescato variables desde un iframe con $signed_request


Copy this code and paste it in your HTML
  1. <?php
  2. // THE MAGIC SAUCE
  3. $signed_request = $facebook->getSignedRequest();
  4.  
  5. $page_id = $signed_request["page"]["id"];
  6. $like_status = $signed_request["page"]["liked"];
  7. // HERE IS A STRING OF YOUR APP DATA.
  8. $app_data = $signed_request["app_data"];
  9.  
  10. echo '$app_data = '.$app_data;
  11. ?>

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.