开发者

Developing Facebook App (connect) on localhost

开发者 https://www.devze.com 2023-03-24 21:42 出处:网络
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,

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?

0

精彩评论

暂无评论...
验证码 换一张
取 消