gpt4 book ai didi

ios - IOS 应用程序中的 Facebook 登录对象不能为 nil

转载 作者:可可西里 更新时间:2023-11-01 05:52:29 25 4
gpt4 key购买 nike

我正在尝试将 Facebook 兼容性集成到我的游戏中,以便能够在游戏结束时分享您的分数。

我已按照 Facebook 文档中概述的所有步骤进行操作,但我似乎找不到此错误的原因或设置为 nil 的对象。

当我按下由以下代码生成的登录按钮时:

FBSDKLoginButton *loginButton = [[FBSDKLoginButton alloc] init];
loginButton.center = self.view.center;
[self.view addSubview:loginButton];

我收到此错误:

*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** setObjectForKey: object cannot be nil (key: client_id)'
*** First throw call stack:
(0x183fc659c 0x1946cc0e4 0x183eb11f8 0x1000b690c 0x1000b6d18 0x1000b6cc4 0x1000b5b8c 0x1000b2794 0x1887a9418 0x18879252c 0x1887a8db4 0x1887a8a40 0x1887a1f94 0x18877568c 0x188a1460c 0x188773bf4 0x183f7e9ec 0x183f7dc90 0x183f7bd40 0x183ea90a4 0x18d04b5a4 0x1887daaa4 0x1000a3f0c 0x194d3aa08)
libc++abi.dylib: terminating with uncaught exception of type NSException

谢谢!

编辑:

0   Eggs                                0x00000001000e1994 -[GameViewController viewDidLoad] + 920
1 UIKit 0x0000000188775184 <redacted> + 692
2 UIKit 0x0000000188774e94 <redacted> + 32
3 UIKit 0x000000018877b55c <redacted> + 72
4 UIKit 0x0000000188778cdc <redacted> + 260
5 UIKit 0x00000001887e9d24 <redacted> + 56
6 UIKit 0x00000001889fd890 <redacted> + 2804
7 UIKit 0x00000001889ffe08 <redacted> + 1480
8 UIKit 0x00000001889fe4a0 <redacted> + 184
9 FrontBoardServices 0x000000018c23562c <redacted> + 28
10 CoreFoundation 0x0000000183f7ea28 <redacted> + 20
11 CoreFoundation 0x0000000183f7db30 <redacted> + 312
12 CoreFoundation 0x0000000183f7c154 <redacted> + 1756
13 CoreFoundation 0x0000000183ea90a4 CFRunLoopRunSpecific + 396
14 UIKit 0x00000001887dfaac <redacted> + 552
15 UIKit 0x00000001887daaa4 UIApplicationMain + 1488
16 Eggs 0x00000001000e7efc main + 116
17 libdyld.dylib 0x0000000194d3aa08 <redacted> + 4

最佳答案

我有同样的问题,但我通过检查 info.plist 解决了这个问题。我建议仔细检查您的拼写。它需要是 FacebookAppID,我把它作为 FacebookID。当我修正错别字时,它运行良好。但是,您可能会遇到不同的问题。

关于ios - IOS 应用程序中的 Facebook 登录对象不能为 nil,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29506690/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com