Using this sample I am easily able to run and get access token,但是当我在自己的应用程序中实现同样的方法时,它会返回空值。
发布于 2018-01-31 17:56:20
发布于 2018-05-07 19:02:57
更新:
AccountKitConfiguration.AccountKitConfigurationBuilder configurationBuilder =
new AccountKitConfiguration.AccountKitConfigurationBuilder(
LoginType.PHONE,
AccountKitActivity.ResponseType.TOKEN);请确保您使用的是AccountKitActivity.ResponseType.TOKEN
=============你试过了吗:
带有Android6.0自动备份的
访问令牌
帐户工具包访问令牌与Android 6.0中引入的自动备份功能不兼容,因为备份的访问令牌可能不再有效。当你的应用程序使用这样一个无效的令牌时,它不会收到Facebook的数据作为回报。要防止出现此问题,请从自动备份的数据中排除访问令牌。
为此,请使用以下上下文在项目中创建资源XML文件,例如res/xml/backup_config.xml。
<?xml version="1.0" encoding="utf-8"?>
<full-backup-content>
<exclude domain="sharedpref" path="com.facebook.accountkit.AccessTokenManager.SharedPreferences.xml"/>
</full-backup-content>然后在清单中的` `application‘标记中引用资源文件。
<application ... android:fullBackupContent="@xml/backup_config">https://developers.facebook.com/docs/accountkit/accesstokens
https://stackoverflow.com/questions/39397393
复制相似问题