Facebook登录管理器引发错误:登录失败 [英] facebook login manager throws Error: Login Failed

查看:288
本文介绍了Facebook登录管理器引发错误:登录失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用其github页面上的代码示例-

Using the code sample from their github page -

LoginManager.logInWithReadPermissions(["public_profile"]).then(
      (result) => {
        if (result.isCancelled) {
          console.log("Login cancelled");
        } else {
          console.log(
            "Login success with permissions: " +
              result.grantedPermissions.toString()
          );
        }
      },
      error => {
        console.log("Login fail with error: " + error);
      }
    );

这在android上运行得很好,但是在ios中什么也没做.我尝试LoginManager.logOut()失败. 我已经仔细检查了info.plist的详细信息.似乎无法弄清为什么登录失败.

This runs perfectly fine on android but does nothing in ios. I tried LoginManager.logOut() without success. I have double checked my info.plist details. Can't seem to figure out why login fails.

推荐答案

最新的4.39版本似乎有问题.我通过将所有与Facebook相关的Pod降级为4.38.0来解决此问题.

The latest 4.39 version seems to be buggy. I got around it by downgrading all facebook related pods to 4.38.0.

我的pod文件看起来像这样-

My pod file looks like this -

  pod 'FacebookSDK', '~> 4.38.0'
  pod 'FBSDKShareKit', '~> 4.38.0'
  pod 'FBSDKCoreKit', '~> 4.38.0'
  pod 'FBSDKLoginKit', '~> 4.38.0'

这篇关于Facebook登录管理器引发错误:登录失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆