我在将facebook登录保存到我的数据库时遇到问题。我在浏览器中收到错误。
Could not authenticate you from Facebook because "Invalid credentials".
这个错误在我的终端。有任何想法吗?我已经浏览了2天,但facebook api可能已经改变了。我唯一的领先是我的应用根本没有使用客户端令牌。
而且我不知道如何调试用户为零的位置。任何帮助表示赞赏。感谢。
Started GET "/users/auth/facebook/callback
code=AQCdbZAc0Nk6YS9_YNebSvNzRC9TQwWQbgolxpu2ZtNsxjP9nzECvkDGFQE71gxTTv86_ uc5mhkTzB4FBZinlDEaD0FFakDu3H-V7YmmYy_kcTRjxQTPucD-GnBlAiozDyQ3KLhnXE3nzWbcRsXwF_eFfc4kGUU8ww9Sgds906-w6lFppl4e78iudEfs9d-lhxgP_qa3_oUBfcG2fEiIYkMGYIOQIg_-9PWhgdrh_WT8qFyemN1qtkBuwE173UI-EodfrfGBTZVBBjM-U8n4rqeFX6gqgyNldMMa9gzXRVPuZ7cBEc1okzuQTgTAagz-KMmW0rNXgP81nWCVgqSPsX1O&state=c8957c4caba73271f3ed9a083412aa995afebf1ba2e63f50" for 127.0.0.1 at 2016-02-27 22:11:16 -0800
I, [2016-02-27T22:11:16.190167 #9991] INFO -- omniauth: (facebook) Callback phase initiated.
E, [2016-02-27T22:11:16.350628 #9991] ERROR -- omniauth: (facebook) Authentication failure! invalid_credentials: OAuth2::Error, :
{"error":{"message":"The request is invalid because the app is configured as a desktop app","type":"OAuthException","code":1,"fbtrace_id":"GWdVBeCdl0k"}}
Processing by Devise::OmniauthCallbacksController#failure as HTML
Parameters: {"code"=>"AQCdbZAc0Nk6YS9_YNebSvNzRC9TQwWQbgolxpu2ZtNsxjP9nzECvkDGFQE71gxTTv86_uc5mhkTzB4FBZinlDEaD0FFakDu3H-V7YmmYy_kcTRjxQTPucD-GnBlAiozDyQ3KLhnXE3nzWbcRsXwF_eFfc4kGUU8ww9Sgds906-w6lFppl4e78iudEfs9d-lhxgP_qa3_oUBfcG2fEiIYkMGYIOQIg_-9PWhgdrh_WT8qFyemN1qtkBuwE173UI-EodfrfGBTZVBBjM-U8n4rqeFX6gqgyNldMMa9gzXRVPuZ7cBEc1okzuQTgTAagz-KMmW0rNXgP81nWCVgqSPsX1O", "state"=>"c8957c4caba73271f3ed9a083412aa995afebf1ba2e63f50"}
Redirected to http://localhost:3000/users/sign_in
完成302发现在211ms(ActiveRecord:0.0ms)
答案 0 :(得分:0)
我的猜测是 1.您使用了facebook开发人员api的不正确凭据 2.由于您输入了无效的电子邮件ID或密码,因此Facebook登录失败。