开发者

Does Facebook login kick off an event?

开发者 https://www.devze.com 2023-03-20 02:07 出处:网络
I have this on my page <fb:login-button perms=\"开发者_如何学Gopublish_stream\">Login with Facebook</fb:login-button>

I have this on my page

<fb:login-button perms="开发者_如何学Gopublish_stream">Login with Facebook</fb:login-button>

But I want to know if there is a way that when a user clicks the login button, I can tell if they've successfully logged in or not, like if there's an event that Facebook throws me or something when that login window is closed, if the users attempt was successful or not.

I know I can check randomly in the app by making a request for the me object, and seeing if it comes back correctly, but I want it to be thrown right after that login window is exited (whether it is exited b/c a login was successful, or a user denied something).


I can do it with this :)

FB.Event.subscribe('auth.login', function(response) {
  // do something with response.session
});


Is this what you're looking for? http://developers.facebook.com/docs/reference/javascript/FB.login/

0

精彩评论

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

关注公众号