fb:visible-to-connection not working?
Hi i have created new iFrame APP.
this is code part:
<fb:visible-to-connection>Welcome, fans!<fb:else>Become fan</fb:else></fb:visible-to-connection>
<script src="http://connect.开发者_运维知识库facebook.net/en_US/all.js"></script>
Can anyone help me out??
I also tried doing this with newest Facebook PHP SDK. Unfortunately i can check it first i user accepted the APP, which is not the point in this case.
I am almost sure that is not working anymore.
To detect a like or non-liker you can use the signed request to get that data. It gets passed to a tab when it is loaded.
<?php
$signed_request = $_REQUEST["signed_request"];
list($encoded_sig, $payload) = explode('.', $signed_request, 2);
$data = json_decode(base64_decode(strtr($payload, '-_', '+/')), true);
?>
Then in the body of your HTML:
<?php
if ($data["page"]["liked"]!=1) {
echo('<div id="NON_LIKER_CONTENT"> <img src="nonliker.jpg" width="520"/></div>');
} else {
echo('<div id="LIKER_CONTENT"> <img src="liker.jpg" width="520"/></div>');
}
?>
精彩评论