Android   发布时间:2022-04-28  发布网站:大佬教程  code.js-code.com
大佬教程收集整理的这篇文章主要介绍了Android AccountKit.getCurrentAccount返回“来自服务器的API调用需要appsecret_proof参数”大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
我正在尝试Facebook AccountKit,如下所示: https://developers.facebook.com/docs/accountkit/android/integrating

我开始使用AccountKitAcitivity:

AccountKitCon@L_675_1@uration.AccountKitCon@L_675_1@urationBuilder con@L_675_1@urationBuilder =
                new AccountKitCon@L_675_1@uration.AccountKitCon@L_675_1@urationBuilder(
                        LoginType.PHONE,AccountKitActivity.ResponseType.TOKEN);
intent.putExtra(
AccountKitActivity.account_KIT_ACTIVITY_CON@L_675_1@URATION,con@L_675_1@urationBuilder.build());
startActivityForResult(intent,APP_requEST_CODE);

在我结束时使用“已验证”完成SMS登录流程后,当我在我的活动中调用AccountKit.getCurrentAccount(…)时,我收到“来自服务器的API调用需要appsecret_proof参数”错误.

只能通过将“App Secret Proof for Server API调用关闭来“解决”.这会使我的应用程序不那么安全……任何建议?

解决方法

如果将“启用客户端访问令牌流”设置为true,则只会在登录流结束时返回代码.您还需要设置responseType.CODE.然后,您可以将其替换为服务器上的令牌.

如果您将“require app secret”设置为true,那么/ me(以及其他一些)只能从服务器调用. getCurrentAccount实际上包装了/ me端点,然后无法调用.

大佬总结

以上是大佬教程为你收集整理的Android AccountKit.getCurrentAccount返回“来自服务器的API调用需要appsecret_proof参数”全部内容,希望文章能够帮你解决Android AccountKit.getCurrentAccount返回“来自服务器的API调用需要appsecret_proof参数”所遇到的程序开发问题。

如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。