我为粉丝页面的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