Facebook登录在发布App之前正在使用Release APK,但在发布相同APK之后却无法使用 [英] Facebook login is working with release APK before publishing App, but not after publishing same APK

查看:76
本文介绍了Facebook登录在发布App之前正在使用Release APK,但在发布相同APK之后却无法使用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试从过去2天开始在我的应用程序中实现 Facebook登录.我已经按照所有步骤进行操作,并在Facebook开发者帐户中将密钥哈希(用于调试发布)都添加到了我的应用中.

I am trying to implement Facebook Login into my app from past 2 days. I have followed all the steps and added both key-hash (for debug and release) into my app at facebook developer account.

在Play商店中发布应用之前,它可以与两种类型的构建变体一起正常使用,但是从Play商店下载相同的发行变体(我正在测试发布应用之前,我正在测试)后,Facbook登录无法正常工作

Its working fine with both type of build variant before publishing app in Play Store, but after downloading same release variant (which I am testing before publishing app) from Play Store, Facbook Login is not working.

另一件事是,仅当设备中安装了Facebook应用程序时,Facebook登录才起作用.如果未安装App,则可以在Web视图下正常工作.

One more thing is that Facebook Login is not working only if Facebook app is installed in device. If App is not installed, its working fine with web view.

我已使用以下代码通过更改android studio中的构建变体来获取调试信息并释放键哈希:

I have used below code to get debug and release key-hash by changing build variants in android studio:

try {
        PackageInfo info = getPackageManager().getPackageInfo("com.my.package.name", PackageManager.GET_SIGNATURES);
        for (Signature signature : info.signatures) {
            MessageDigest md = MessageDigest.getInstance("SHA");
            md.update(signature.toByteArray());
            Log.d("KeyHash:", Base64.encodeToString(md.digest(), Base64.DEFAULT));
        }
    } catch (PackageManager.NameNotFoundException e) {
    } catch (NoSuchAlgorithmException e) {
    }

我的应用可在Facebook开发人员帐户中公开

我没有弄错我做错的事情或缺少的事情.请帮忙!

I am not getting what I am doing wrong or what I am missing. Please help !

我们将非常感谢您的帮助. 谢谢.

Your help will be highly appreciated. Thank you.

推荐答案

发布该应用后,Google会为您的apk创建新的指纹.添加新的指纹.可能有用.

When the app is published, Google make a new fingerprint for your apk. Add the new fingerprint. It might work.

这篇关于Facebook登录在发布App之前正在使用Release APK,但在发布相同APK之后却无法使用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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