我的应用程序在这几天内运行良好。但它突然因任何修改而下降。我正在尝试测试 FB.api 功能,例如 FB.login, FB.api('me/........'),它也没有任何回复。以下是我的原始代码。有关于 FB.api 的更新吗?
<script type="text/javascript" src="jquery.min.js"></script>
<script type="text/javascript">
(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) {return;}
js = d.createElement(s); js.id = id;
js.src = "//connect.facebook.net/en_US/all.js#xfbml=1";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));
</script>
<script type="text/javascript">
window.fbAsyncInit = function() {
FB.init({
appId : '<?php echo AppInfo::appID(); ?>',
status : true,
cookie : true,
frictionlessRequests: true
});
FB.Canvas.setAutoResize();
FB.getLoginStatus(function(response) {
FB.Canvas.scrollTo(0,0);
$('area').click(function() {
FB.login(function(response) {
if (response.authResponse) {
FB.api('/me/permissions?access_token=' + response.authResponse.accessToken, function(response) {
alert("abc:" + response.authResponse.accessToken);
if (response.data[0].publish_stream == undefined) {
return;
}
if (response.data[0].publish_stream == 1) {
window.location.href = "like.php";
}
});
}
}, {scope: 'email,user_likes,publish_stream'});
return false;
});
});/**/
};
</script>