FB登录:登录成功后,不知道如何获得响应 [英] FB Login : Don't know how to get response after a successful login
本文介绍了FB登录:登录成功后,不知道如何获得响应的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我已经在我的网站上添加了一个fblogin按钮
它工作正常
a按钮放置,当用户点击它时,会打开一个对话框进行登录。
I have added an fblogin button to my website it is working fine a button is placed and when user clicks on it a dialogue box opens for login.
但我不知道如何在成功登录后得到回复。
But i don't know how to get response after a successful login.
请建议
推荐答案
您可以使用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);
});
这篇关于FB登录:登录成功后,不知道如何获得响应的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文