gpt4 book ai didi

ios - SCSDKLoginKit (snapchat) 中的重定向功能不起作用

转载 作者:行者123 更新时间:2023-11-29 05:53:56 26 4
gpt4 key购买 nike

我正在尝试在我的项目中实现 Snapchat 登录按钮。我已经下载了 SDK,创建了 Snapchat 开发者帐户,并在 info.plist 中编写了一些代码。

现在我可以登录 Snapchat 帐户,但当我单击返回应用程序时,我收到 404 未找到错误页面。我认为问题出在这个函数上,因为当我点击后退按钮时它不起作用:

  func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {

FBSDKApplicationDelegate.sharedInstance()?.application(application, didFinishLaunchingWithOptions: launchOptions)

TWTRTwitter.sharedInstance().start(withConsumerKey: "xxx", consumerSecret: "xxx")

return true
}

func application(_ app: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey : Any] = [:]) -> Bool {

if TWTRTwitter.sharedInstance().application(app, open: url, options: options) {return true}

if FBSDKApplicationDelegate.sharedInstance().application(app, open: url, options: options) {return true}

if SCSDKLoginClient.application(app, open: url, options: options) {return true} // not work this func

return true
}

对于 Facebook 或 Twitter,还有一项功能可以让它们在您进入应用程序时发挥作用,但对于 Snapchat,它不存在。

我在 Snapchat 官方文档中找不到任何相关信息。可能是什么问题?

最佳答案

再看看info.list,这很棘手,当我遇到同样的问题时,请确保你的 SCSDKRedirectUrl 在你的 snapchat 应用程序中相同,原因是我的 SCSDKRedirectUrl 的第一个字符是大写字母,当我将其更改为小信一切都好即

<key>SCSDKRedirectUrl</key>
<string>yourAppName://auth/snap</string>

<key>LSApplicationQueriesSchemes</key>
<string>yourAppName</string>
<array>

关于ios - SCSDKLoginKit (snapchat) 中的重定向功能不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55379356/

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