首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >获取facebook应用程序安装时间戳

问获取facebook应用程序安装时间戳
EN

Stack Overflow用户
提问于 2012-05-20 18:12:54
回答 1查看 194关注 0票数 0

如何使用JS api获取当前使用的facebook应用的安装时间?

一般来说,我想验证当前在线的用户是新用户,并且还没有注册返回用户。

EN

回答 1

Stack Overflow用户

发布于 2012-05-20 19:20:49

你可以使用FB.getLoginStatus作为推荐的here,它可以告诉你访问者是否登录了facebook,如果是的话,他们是否已经在你的应用程序中注册了。

代码语言:javascript
复制
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.
  }
 });
票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/10672545

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档