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

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

问题描述

我已将我的应用程序与Facebook集成,为此我正在使用Facebook的,您会看到按Okay之后,应该会出现一条错误消息,显示导致认证失败的更为技术性的描述。



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


D /授权(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天全站免登陆