I'm developing a facebook app us开发者_运维知识库ing the javascript sdk on localhost. I've added the domain to the canvas url and setup my hosts file to point it to 127.0.0.7. When I go to the domain, it resolves as expected.
I've setup this domain as the canvas URL within facebook.
I have the following code and the problem is the page just continues to refresh over and over again.
FB.init({
appId:'XXXXXXXXXXX', cookie:true,
status:true, xfbml:true
});
FB.Event.subscribe('auth.login', function() {
window.location.reload();
});
$('.logout_fb').click(function(){
FB.logout(function(){
window.location.reload();
});
});
Any ideas what the problem could be?
Thank you!
Facebook needs to be able to reach your web server. Does it work when you host it on an external server?
精彩评论