作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我刚刚将我的应用程序电影传输到 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/
我刚刚将我的应用程序电影传输到 Parse Server。除了我的 Twitter 登录和注册外,我的一切正常。当我登录或注册时,我收到一条内部服务器错误消息打印到我的控制台。我正在使用最新的 Par
我在一个地方使用 Parse 和 Twitter。 我通过 ParseTwitterUtils 注册并登录我的用户。这只为我提供了用户的 Twitter 句柄、auth_token、auth_secr
我是一名优秀的程序员,十分优秀!