detect fans in iframe taq
2 posters
Page 1 of 1
detect fans in iframe taq
how to detect fans / non-fans in iframe to display different info. for them?
this code work to detect my app, by not my page....
this code work to detect my app, by not my page....
- Code:
<?php
$signed_request = $_REQUEST["signed_request"];
list($encoded_sig, $payload) = explode('.', $signed_request, 2);
$data = json_decode(base64_decode(strtr($payload, '-_', '+/')), true);
$app_data = isset($data["app_data"]) ? $data["app_data"] : '';
$_REQUEST["fb_page_id"] = $data["page"]["id"];
$access_admin = $data["page"]["admin"] == 1;
$has_liked = $data["page"]["liked"] == 1;
?>
<?php if($has_liked) : ?>
<p>fan-specifc</p>
<?php else : ?>
<p>for non-fans only</p>
<?php endif; ?>
</body>
</html>
achan- New Member
Re: detect fans in iframe taq
The signed up request is the only piece of code that seems to be correct, of the above.
Unfortunately, I cannot post the codes that must be used in an iFrame-based tab for fans and non-fans (copyright reasons), but you can find a tutorial on Google.
You just need to get the signed request, the app's ID, the app's secret key, and then 2 echo's: one for fans, and one for non-fans.
Good luck!
Unfortunately, I cannot post the codes that must be used in an iFrame-based tab for fans and non-fans (copyright reasons), but you can find a tutorial on Google.
You just need to get the signed request, the app's ID, the app's secret key, and then 2 echo's: one for fans, and one for non-fans.
Good luck!
Admin- Ultimate SN Fan
Similar topics
» Detect Fans in PHP
» "Send an update" to all fans of a Facebook Fans page/app
» Comment box in an iFrame tab
» What the? iframe app has changed
» [Solved] Facebook Page's tab added through iFrame not visible while logged out
» "Send an update" to all fans of a Facebook Fans page/app
» Comment box in an iFrame tab
» What the? iframe app has changed
» [Solved] Facebook Page's tab added through iFrame not visible while logged out
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum
|
|