我爲粉絲頁面的iframe應用程序按鈕了,問題是,如果Facebook的它重新加載應用程序的iframe頁面,但不頂欄上如用戶點擊刷新上不同於如果用戶點擊同一位置聽衆像不像從iframe的應用
我applicatioon檢查,如果用戶是LIKEØ不喜歡轉頁扇,如果第一次不點擊Like按鈕就無法進行(類似按鈕打算在頂欄上的按鈕進行iframe的應用)
<div id="fb-root"></div>
<script>
window.fbAsyncInit = function() {
FB.init({
appId : '<?php echo $app_id; ?>', // App ID
status : true, // check login status
channelUrl : '//www. domain .it/<?php echo $sub_dir_app; ?>/cf.php', // Channel File
cookie : true, // enable cookies to allow the server to access the session
xfbml : true // parse XFBML
});
FB.Event.subscribe('edge.remove', function(response) {
//top.location.reload();
alert('ok NOLIKE');
});
FB.Event.subscribe('edge.create', function(response) {
//top.location.reload();
alert('ok LIKE');
});
};
// Load the SDK Asynchronously
(function(d){
var js, id = 'facebook-jssdk', ref = d.getElementsByTagName('script')[0];
if (d.getElementById(id)) {return;}
js = d.createElement('script'); js.id = id; js.async = true;
js.src = "//connect.facebook.net/it_IT/all.js";
ref.parentNode.insertBefore(js, ref);
}(document));
例如,你可以看到這個應用程序:https://www.facebook.com/extremesilver.gioielli/app_119909504798072,第一次點擊在LIKE上,你可以看到刷新,傳遞你點擊UNLIKE並看到iframe應用程序的刷新,在標準應用程序刷新UNLIKE不工作 – 2012-04-13 13:30:52