iOS 上的 com.facebook.sdk 错误 2 [英] com.facebook.sdk error 2 on iOS

查看:21
本文介绍了iOS 上的 com.facebook.sdk 错误 2的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个可以在 iOS 和 Android 上运行的 Phonegap 应用.该应用程序具有 Facebook 登录功能,该功能直到几天前才有效.我们的一些 beta 测试人员报告了无法完成操作 com.facebook.sdk 错误 2"错误.这些测试人员的设备各不相同:iPhone 5、iPhone 4s、iPod Touch、iOS 5.1.1 和 iOS 6.0.

I have a Phonegap app that runs on both iOS and Android. The app has a Facebook login feature which worked until a few days ago. A few of our beta testers have reported an 'The operation couldn't be completed com.facebook.sdk error 2' error. The devices of these testers vary: iPhone 5, iPhone 4s, iPod Touch, iOS 5.1.1 and iOS 6.0.

我们使用最新的 Facebook SDK 和 Phonegap Facebook 登录插件 (https://github.com/davejohnson/phonegap-plugin-facebook-connect/).

We use the latest Facebook SDK and a Phonegap Facebook login plugin (https://github.com/davejohnson/phonegap-plugin-facebook-connect/).

我进行了一些研究,发现出现此错误的原因如下:

I've done some research and found the following reasons why this error could occur:

  • 我的 info.plist 文件中的 BundleIdentifier 和 BundleURLName 与我的 Facebook 应用设置中原生 iOS 应用下的 Bundle ID 不匹配.
  • 应用仍处于沙盒模式
  • 该应用在 Facebook 设置中被禁用(设备设置 -> Facebook -> 允许这些应用使用您的帐户).
  • iOS 6.0 不允许同时询问读写权限(不确定我是否有这个权利).

情况如下:

这是一个非常不一致的错误(就我而言).如果我在允许这些应用程序使用您的帐户"中关闭应用程序(在我的情况下,应用程序列在那里),我只能自己重现错误,但我可以通过再次允许应用程序轻松修复错误.目前,大多数测试人员都没有这个错误(不再),但错误仍然存​​在于 iPod 上(该应用程序也未列在允许这些应用程序使用您的帐户"中).

It's a very inconsistent bug (in my case). I can only reproduce the error myself if I switch off the app in 'Allow These Apps To Use Your Account' (in my case the app is listed there), but I can easily fix the error by allowing the app again. At the moment most of the testers don't have this bug (anymore), but the error remains on an iPod (where the app isn't listed in 'Allow These Apps To Use Your Account' either).

有人知道我为什么会遇到这个错误吗?

Does anyone have any idea why I'm having this bug?

推荐答案

事实证明:com.facebook.sdk 错误 2 可以转化为许多事情.我正在寻找某种 Facebook SDK 错误转换表,但我找不到.就我而言:com.facebook.sdk 错误 2 发生,因为连接超时.收到此错误的用户的网络/WiFi 连接不良.

Turns out: a com.facebook.sdk error 2 can translate into a number of things. I'm looking for some kind of Facebook SDK error translation table, but I'm unable to find one. In my case: The com.facebook.sdk error 2 happened because the connection timed out. Users who got this error had a bad network/WiFi connection.

我们实施了一个错误日志系统,该系统会在每次登录 Facebook 时发生错误时记录错误详细信息.在这些日志中,我们可以看到 com.facebook.sdk 错误 2 经常发生,但每次用户在几秒钟后尝试再次登录时都会解决.

We implemented an error logging system, which logged the error details every time an error happened while logging into Facebook. In those logs we could see a com.facebook.sdk error 2 happening quite a lot, but it being resolved every time the user tried to log in again after a few seconds.

这可能是因为我无法找到正确的文档,但我过去和现在仍然对这些 SDK 错误的模糊性感到非常沮丧.有很多关于权限请求的文档(这可能导致 com.facebook.sdk 错误 2),但显然这个错误可能是由更多的事情引起的.很高兴在某处看到这个记录.

It might be due to my inability to find the right documentation, but I was and still am quite frustrated about the vagueness of these SDK errors. There is a lot of documentation about permission asking (which can result into the com.facebook.sdk error 2), but apparently this error can be caused by more things. It would be nice to see this documented somewhere as well.

这篇关于iOS 上的 com.facebook.sdk 错误 2的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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