我正在使用AWS Cognito同步来跨设备同步我的游戏数据。从facebook成功获取令牌ID之后,数据将同步到服务器,但是每当我登录facebook并再次调用该函数以同步数据时,都会收到以下异常
E/Unity: HttpErrorResponseException: Exception of type 'Amazon.Runtime.Internal.HttpErrorResponseException' was thrown.
at Amazon.Runtime.Internal.UnityRequest.GetResponse () [0x00000] in <filename unknown>:0
at Amazon.Runtime.Internal.HttpHandler`1[System.String].InvokeSync (IExecutionContext executionContext) [0x00000] in <filename unknown>:0
at Amazon.Runtime.Internal.PipelineHandler.InvokeSync (IExecutionContext executionContext) [0x00000] in <filename unknown>:0
at Amazon.Runtime.Internal.Unmarshaller.InvokeSync (IExecutionContext executionContext) [0x00000] in <filename unknown>:0
at Amazon.Runtime.Internal.PipelineHandler.InvokeSync (IExecutionContext executionContext) [0x00000] in <filename unknown>:0
at Amazon.Runtime.Internal.ErrorHandler.InvokeSync (IExecutionContext executionContext) [0x00000] in <filename unknown>:0
Rethrow as NotAuthorizedException: Access to Identity 'us-east-2:fba7918c-2fc3-4829-98ce-b473b4fc309d' is forbidden.
at Amazon.Runtime.Internal.HttpErrorResponseException
这是我的代码
获得回调结果后,我将凭据添加到aws客户端脚本中。
void AddFacebookTokenToCognito(){
SyncClient.Instance.Credentials.AddLogin("graph.facebook.com",
AccessToken.CurrentAccessToken.TokenString);
}
我不知道这可能是什么问题