0

似乎我使用带有 react-native-fbsdk 的测试用户登录时出错。以下是相关代码:

LoginManager.logInWithReadPermissions(['public_profile']).then(async result => {
})
.catch(error => {
    console.dir(error);
});

现在,承诺拒绝被捕获,并在控制台中打印出来:

{
    "framesToPop": 1,
    "code": "FacebookSDK",
    "nativeStackIOS": [
Array[26]
0
:
"0   beebo                               0x000000010c3d5306 RCTJSErrorFromCodeMessageAndNSError + 134"
1
:
"1   beebo                               0x000000010c349f38 __41-[RCTModuleMethod processMethodSignature]_block_invoke_2.224 + 184"
2
:
"2   beebo                               0x000000010c64f237 __71-[RCTFBSDKLoginManager _loginWithPermissions:resolver:rejecter:isRead:]_block_invoke + 135"
3
:
"3   beebo                               0x000000010c1dd4fa -[FBSDKLoginManager invokeHandler:error:] + 266"
4
:
"4   beebo                               0x000000010c1def35 __57-[FBSDKLoginManager validateReauthentication:withResult:]_block_invoke + 645"
5
:
"5   beebo                               0x000000010c1a7ce1 -[FBSDKGraphRequestMetadata invokeCompletionHandlerForConnection:withResults:error:] + 209"
6
:
"6   beebo                               0x000000010c1a3f1f __82-[FBSDKGraphRequestConnection processResultBody:error:metadata:canNotifyDelegate:]_block_invoke + 207"
7
:
"7   beebo                               0x000000010c1a3d1d -[FBSDKGraphRequestConnection processResultBody:error:metadata:canNotifyDelegate:] + 1805"
8
:
"8   beebo                               0x000000010c1a3475 __64-[FBSDKGraphRequestConnection completeWithResults:networkError:]_block_invoke + 1333"
9
:
"9   CoreFoundation                      0x0000000112a52652 __53-[__NSArrayM enumerateObjectsWithOptions:usingBlock:]_block_invoke + 114"
10
:
"10  CoreFoundation                      0x0000000112a524e2 -[__NSArrayM enumerateObjectsWithOptions:usingBlock:] + 194"
11
:
"11  beebo                               0x000000010c1a2df3 -[FBSDKGraphRequestConnection completeWithResults:networkError:] + 1043"
12
:
"12  beebo                               0x000000010c1a1a86 -[FBSDKGraphRequestConnection completeFBSDKURLSessionWithResponse:data:networkError:] + 2134"
13
:
"13  beebo                               0x000000010c19e537 __36-[FBSDKGraphRequestConnection start]_block_invoke_2 + 167"
14
:
"14  beebo                               0x000000010c1cd974 __65-[FBSDKURLSessionTask invokeHandler:error:response:responseData:]_block_invoke + 52"
15
:
"15  libdispatch.dylib                   0x0000000113bfc585 _dispatch_call_block_and_release + 12"
16
:
"16  libdispatch.dylib                   0x0000000113c1d792 _dispatch_client_callout + 8"
17
:
"17  libdispatch.dylib                   0x0000000113c05247 _dispatch_main_queue_callback_4CF + 1041"
18
:
"18  CoreFoundation                      0x0000000112a86909 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9"
19
:
"19  CoreFoundation                      0x0000000112a4cae4 __CFRunLoopRun + 2164"
20
:
"20  CoreFoundation                      0x0000000112a4c016 CFRunLoopRunSpecific + 406"
21
:
"21  GraphicsServices                    0x000000011469ba24 GSEventRunModal + 62"
22
:
"22  UIKit                               0x00000001102e90d4 UIApplicationMain + 159"
23
:
"23  beebo                               0x000000010c15629f main + 111"
24
:
"24  libdyld.dylib                       0x0000000113c6665d start + 1"
25
:
"25  ???                                 0x0000000000000001 0x0 + 1"
    ],
    "domain": "com.facebook.sdk.login",
    "userInfo": {}
}

我尽力在这里打印返回的对象。

使用普通的非测试用户可以完美地工作。

有没有人暗示可能会发生什么?

编辑:这里的问题是,如果我提供测试用户,苹果只会批准我的应用程序。

4

1 回答 1

-1

所以,我终于找到了答案。看起来苹果改变了钥匙串在 iOS 10 上的工作方式。有关更多信息,请查看此答案: 如何在 iOS 10 上使用 Facebook iOS SDK

于 2017-05-02T00:42:47.763 回答