且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

FB登录:登录成功后,不知道如何获得响应

更新时间:2023-08-25 14:06:16

您可以使用JS SDK订阅该类型的事件。查看 facebook javascript文档,您的方法正在寻找的是'auth.authResponseChange'

You can use the JS SDK to subscribe to events of that type. Take a look at the facebook javascript documentation, the method you are looking for is 'auth.authResponseChange' :

FB.Event.subscribe('auth.authResponseChange', function(response) {
  alert('The status of the session is: ' + response.status);
});