如何使用JS api获取当前使用的facebook应用的安装时间?
一般来说,我想验证当前在线的用户是新用户,并且还没有注册返回用户。
发布于 2012-05-20 19:20:49
你可以使用FB.getLoginStatus作为推荐的here,它可以告诉你访问者是否登录了facebook,如果是的话,他们是否已经在你的应用程序中注册了。
FB.getLoginStatus(function(response) {
if (response.status === 'connected') {
// the user is logged in and has authenticated your
// app, and response.authResponse supplies
// the user's ID, a valid access token, a signed
// request, and the time the access token
// and signed request each expire
var uid = response.authResponse.userID;
var accessToken = response.authResponse.accessToken;
} else if (response.status === 'not_authorized') {
// the user is logged in to Facebook,
// but has not authenticated your app
} else {
// the user isn't logged in to Facebook.
}
});https://stackoverflow.com/questions/10672545
复制相似问题