【问题标题】:How to get user_likes after firebaseauth-ui call is successful with user_likes permission approved on facebookfirebaseauth-ui 调用成功后如何获取 user_likes 并在 facebook 上批准 user_likes 权限
【发布时间】:2017-01-10 14:32:13
【问题描述】:

我正在使用 FirebaseUI for web 开发登录流程。 使用范围(权限)user_likes 调用 Facebook 提供程序。 用户批准应用和权限后,登录成功。

但是,我现在想知道如何通过图形 API 直接调用 facebook 来检索 user_likes。 本质上,在哪里从成功的 firebase auth 中检索所需的参数,以便成功的 graph api 检索 user_likes 列表。

【问题讨论】:

    标签: javascript facebook facebook-graph-api firebase-authentication firebaseui


    【解决方案1】:

    您需要从 signInSuccess 回调中获取 facebook auth 凭据。然后,您可以使用 OAuth 凭据查询 facebook api:

    'callbacks': {
          'signInSuccess': function(currentUser, credential, redirectUrl) {
            // Do something.
            // Return type determines whether we continue the redirect automatically
            // or whether we leave that to developer to handle.
            // Credential is in credential.accessToken
            return false;
          }
        }
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2014-09-03
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-02-07
      • 1970-01-01
      相关资源
      最近更新 更多