应用程序为 Facebook 登录配置错误:Android Facebook 集成问题 [英] App is misconfigured for Facebook login: Android Facebook integration issue

查看:30
本文介绍了应用程序为 Facebook 登录配置错误:Android Facebook 集成问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已将我的应用程序与 Facebook 集成,为此我使用 Facebook 的 ,您会看到在按确定"后,应该会出现一条错误消息,其中将显示导致身份验证失败的更多技术说明.

例如,如果您使用我们的 Hackbook 示例并且没有在源中提供您自己的 APP_ID 并且没有将您的哈希键添加到仪表板,则在本机 SSO 中按确定"后,您将在 LogCat 中看到此错误对话框(如果 Util.ENABLE_LOG 设置为 true):

<块引用>

D/Facebook-authorize(24739):登录失败:invalid_key:Android 密钥不匹配.您的密钥uk3udeH7vrOGNFH2FJjdJbdWJWI"与您的应用程序设置中指定的允许密钥不匹配.在 http://www.facebook.com/developers

检查您的应用程序设置

我们添加了视觉错误消息来帮助您.理论上,这不会破坏以前的实现如果它从一开始就正确实现.如果您看到此错误消息,则表示您没有在您的信息中心上正确配置您的应用设置.
仔细检查您的 Android 类/包名称、Android 哈希键等.如果您正确执行所有操作,您将不会看到此消息.

总而言之,您收到该错误消息是因为您的应用配置存在问题,例如,仪表板中的 Android 哈希键不匹配.在 Facebook 添加此错误消息之前,对话框将启动,然后自动关闭并失败.要解决此问题,请检查您的 LogCat 是否有任何错误消息,并确保您已正确实施所有内容.您可以阅读我们的文档,以确保一切正确.请勿使用已接受的答案回答此问题.

您还可以关注 Facebook 开发者报告的外部错误报告以获得更多更新.

I have integrated my application with Facebook, and for this I am using Facebook's Graph API. I am retrieving profile and friends information. It is working fine on my device which has Android 2.3 (Gingerbread), but recently my client has faced an issue while he is trying to connect to Facebook through my app. He has Android 4.0 (Ice Cream Sandwich) on his device. When he clicks a button on the app that takes him to the Facebook login screen, after login he gets a message:

My app is misconfigured for Facebook login. Press Okay to go back to the application without connecting to Facebook.

I am not getting what is the problem whether it is related to Android version or what.

How can I fix this problem?

解决方案

I work at Facebook, and this is an important issue that needs to be addressed. The other answer for this question suggests that disabling SSO is very bad and will open up your app to malicious apps that can steal your user's Facebook credentials.

The hack launches a WebView dialog to Facebook without SSO, and the user must type their login credentials into that dialog. Malicious apps can then steal this information easily. It is always advised to implement Facebook SSO correctly to ensure that your app is secure and protect your user's sensitive data.

Prior to adding this error message, the dialog would automatically close without warning and fail silently. We added this error message to visually display that there is an issue with your app configuration in your Facebook app dashboard. For Android, if you check your LogCat, you'll see that after pressing "Okay", there should be an error message that will display a more technical description of what is causing the authentication to fail.

For example, if you use our Hackbook example and did not supply your own APP_ID in the source and did not add your hash key to the dashboard, you'll see this error in LogCat after pressing "Okay" in the native SSO dialog (if Util.ENABLE_LOG is set to true):

D/Facebook-authorize(24739): Login failed: invalid_key:Android key mismatch. Your key "uk3udeH7vrOGNFH2FJjdJbdWJWI" does not match the allowed keys specified in your application settings. Check your application settings at http://www.facebook.com/developers

We added the visual error message to help you. This, in theory, does not break previous implementations if it was implemented correctly to begin with. If you see this error message, that means you did not configure your app settings correctly on your dashboard.
Double check your Android Class/Package name, Android hash keys, etc. You will not see this message if you did everything correctly.

In summary, you are getting that error message because there is an issue with your app configuration, for example, a mismatch between the Android hash keys in your dashboard. Before Facebook added this error message, the dialog would launch, then automatically close and fail. To fix this, check your LogCat for any error messages and make sure that you have everything implemented correctly. You can read up on our documentation to make sure you have everything correct. Do not use the accepted answer for this question.

You can also follow the external bug report that a Facebook developer has reported for more updates.

这篇关于应用程序为 Facebook 登录配置错误:Android Facebook 集成问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆