admin管理员组文章数量:1425695
So, I'm trying to integrate my html with facebook, add facebook login, share, that sort of stuff, but I'm finding a problem. Have searched here and could find the solution for most, but not this one.
It says on the JavaScript console, after I load the html:
Uncaught ReferenceError: updateStatusCallback is not defined.
The code is small, so I'll paste it here.
<html>
<head>
<script src=".0.0/jquery.min.js"></script>
<link rel="stylesheet" href="css/style.css" />
<title>Testes</title>
<script>
$(document).ready(function() {
$.ajaxSetup({ cache: true });
$.getScript('.js', function(){
FB.init({
appId: '383086835168967',
});
$('#loginbutton,#feedbutton').removeAttr('disabled');
FB.getLoginStatus(updateStatusCallback); <-- Error ocurring on this line. More specicly, on updateStatusCallback. -->
});
});
</script>
</head>
</html>
Code found at here
So, I'm trying to integrate my html with facebook, add facebook login, share, that sort of stuff, but I'm finding a problem. Have searched here and could find the solution for most, but not this one.
It says on the JavaScript console, after I load the html:
Uncaught ReferenceError: updateStatusCallback is not defined.
The code is small, so I'll paste it here.
<html>
<head>
<script src="http://ajax.googleapis./ajax/libs/jquery/2.0.0/jquery.min.js"></script>
<link rel="stylesheet" href="css/style.css" />
<title>Testes</title>
<script>
$(document).ready(function() {
$.ajaxSetup({ cache: true });
$.getScript('https://connect.facebook/en_UK/all.js', function(){
FB.init({
appId: '383086835168967',
});
$('#loginbutton,#feedbutton').removeAttr('disabled');
FB.getLoginStatus(updateStatusCallback); <-- Error ocurring on this line. More specicly, on updateStatusCallback. -->
});
});
</script>
</head>
</html>
Code found at here
Share Improve this question edited Jan 8, 2014 at 3:28 flx 14.2k11 gold badges58 silver badges73 bronze badges asked Jan 8, 2014 at 3:07 Miyh0Miyh0 491 silver badge7 bronze badges 1- 1 u need to define the updateStatusCallback function – iJade Commented Jan 8, 2014 at 3:10
1 Answer
Reset to default 6That's because the updateStatusCallback
logic is left to the developer. You should do:
FB.getLoginStatus(function(){
alert('Status updated!!');
// Your logic here
});
Or leave the code as you have it now, but adding this:
function updateStatusCallback(){
alert('Status updated!!');
// Your logic here
}
本文标签: javascriptupdateStatusCallback not defined on facebook examble of JQueryStack Overflow
版权声明:本文标题:javascript - updateStatusCallback not defined on facebook examble of JQuery - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745418909a2657814.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论