facebook - Facebook Instant Games 的 getSignedPlayerInfoAsync(),是否需要在每个请求中调用它?
问题描述
文档提到FBInstant.player.getSignedPlayerInfoAsync()
在与自定义后端通信时使用来获取签名。
https://developers.facebook.com/docs/games/instant-games/guides/bots-and-server-communication
我可以在应用程序开始时将签名存储在变量中,然后在当前会话的所有 XMLHttpRequest 中使用它吗?
还是每次发出 XMLHttpRequest 时都需要调用它?
解决方案
您可以只调用一次,但是这将不允许您验证issued_at
时间或加密自定义有效负载。
推荐阅读
- ruby-on-rails - `rails new` 不使用 rbenv 和 `ruby -v` 的 ruby 版本,而 rails s 抛出“您的 Ruby 版本是 2.6.3,但您的 Gemfile 指定了 2.7.2”
- cadence-workflow - 优步 Cadence 活动到期重置时间
- ethereum - 无法获取子合约地址
- html - 如何使用 Angular 9 Firebase 构建医生应用程序
- xamarin - 无法通过 Visual Studio 上传 Xamarin iOS 应用程序以测试飞行
- shell - export LS_COLORS :对以 README* 开头的每个文件应用规则
- c# - 使用 Windows 身份验证时,ASP.NET 强制文件访问作为池标识
- android - 谷歌Pixel相机不如主相机应用
- mongodb - 如何创建具有多个条件的动态 mongodb 查询
- karate - 空手道:替换多个键值