gpt4 book ai didi

ios - 无法使用 twitterkit 登录

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

我正在尝试使用开发人员门户中提供的说明登录 twitterkit,但无济于事。每次我尝试这样做时,无论是使用 loginWithCompletionloginWithViewController 还是使用 TWTRLoginButton,我都会在日志中收到此错误:

CredStore - performQuery - Error copying matching creds.  Error=-25300, query={
class = inet;
"m_Limit" = "m_LimitAll";
ptcl = htps;
"r_Attributes" = 1;
sdmn = "https://api.twitter.com";
srvr = "api.twitter.com";
sync = syna;
}
[TwitterKit] did encounter error with message "Error obtaining user auth token.": Error Domain=TWTRLogInErrorDomain Code=-1 "{"errors":[{"code":32,"message":"Could not authenticate you."}]}" UserInfo={NSLocalizedDescription={"errors":[{"code":32,"message":"Could not authenticate you."}]}}

这是我的plist的内容

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
...
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
<key>NSAllowsArbitraryLoadsInWebContent</key>
<true/>
<key>NSExceptionDomains</key>
<dict>
<key>twitter.com</key>
<dict>
<key>NSExceptionRequiresForwardSecrecy</key>
<false/>
<key>NSIncludesSubdomains</key>
<true/>
</dict>
</dict>
</dict>
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleURLSchemes</key>
<array>
<string>twitterkit-XXXXXXXXX</string>
</array>
</dict>
</array>
<key>LSApplicationQueriesSchemes</key>
<array>
<string>twitter</string>
<string>twitterauth</string>
</array>
</dict>
</plist>

这是一个小型测试应用程序,我必须这样做来检查我是否在我的主应用程序中犯了任何错误,但遗憾的是我也无法登录。

我的播客文件是:

source 'https://github.com/CocoaPods/Specs.git'
inhibit_all_warnings!
platform :ios, '9.0'
target 'Statkid' do
pod 'TwitterKit'
end

日志显示如下:

安装 TwitterCore (3.1.0)安装 TwitterKit (3.3.0)

在我的应用程序设置中,我启用了Calback Locking 并启用了Allow this application to sign in with twitter

如果你能帮助我,我将不胜感激。

此外,我正在为 iOS 9 进行部署。

编辑:

consumer secret 中初始化 twitter 时我有一个额外的空间,但现在我仍然得到这个:

[TwitterKit] did encounter error with message "Error obtaining user auth token.": Error Domain=TWTRLogInErrorDomain Code=-1 "<?xml version="1.0" encoding="UTF-8"?>
<hash>
<error>This client application's callback url has been locked</error>
<request>/oauth/request_token</request>
</hash>
" UserInfo={NSLocalizedDescription=<?xml version="1.0" encoding="UTF-8"?>
<hash>
<error>This client application's callback url has been locked</error>
<request>/oauth/request_token</request>
</hash>

最佳答案

自2018年6月12日起回调锁定将no longer be optional . iOS 应用的正确回调格式是:

twitterkit-MY_CONSUMER_KEY://

关于ios - 无法使用 twitterkit 登录,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49563801/

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