gpt4 book ai didi

ios - ParseTwitterUtils 内部服务器错误

转载 作者:行者123 更新时间:2023-11-28 12:51:32 25 4
gpt4 key购买 nike

我刚刚将我的应用程序电影传输到 Parse Server。除了我的 Twitter 登录和注册外,我的一切正常。当我登录或注册时,我收到一条内部服务器错误消息打印到我的控制台。我正在使用最新的 Parse SDK。这是我的登录代码(我的注册代码类似,它只是从 Twitter API 获取其他数据并将其存储到我的数据库中):

PFTwitterUtils.logInWithBlock {
(user: PFUser?, error: NSError?) -> Void in

if let user = user {

if user.isNew {

spinningActivity.hideAnimated(true)

PFUser.currentUser()?.deleteInBackground()

self.displayNoticeWithTwoActions("Account Not Found", message: "This Twitter account is not in our system. You have to sign up first.", firstButtonTitle: "Sign Up", closeButtonTitle: "Ok", segue: "dontHaveAccountSegue")


} else if error != nil {

spinningActivity.hideAnimated(true)

self.displayError("Error", message: error!.localizedDescription)

} else {

spinningActivity.hideAnimated(true)
self.performSegueWithIdentifier("successfulLoginSegue", sender: self)

}


} else {

spinningActivity.hideAnimated(true)


self.displayError("Error", message: "Unless you tapped on 'Cancel' or 'Done', something went wrong. Please try again.")

}
}

我在网上唯一能找到的是它可能是 Twitter 端的问题……我确保我的消费者 key 和 secret 在我的 AppDelegate 中是正确的。有什么想法吗?

最佳答案

对于您的 index.js 文件,即您的 Parse Server 配置文件,您需要添加以下内容:

var api = new ParseServer ({
databaseURI: xxxxxxx,
cloud: xxxxxx,
appID: xxxxxx,
//more keys
//add oauth keys
oauth: {
facebook: {
appIds: xxxxxxxxxxxxx
},
twitter: {
appIds: xxxxxxxxxxxxx
}
}
})

关于ios - ParseTwitterUtils 内部服务器错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36380644/

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