首页 > 解决方案 > Facebook Instant Games 的 getSignedPlayerInfoAsync(),是否需要在每个请求中调用它?

问题描述

文档提到FBInstant.player.getSignedPlayerInfoAsync()在与自定义后端通信时使用来获取签名。

https://developers.facebook.com/docs/games/instant-games/guides/bots-and-server-communication

我可以在应用程序开始时将签名存储在变量中,然后在当前会话的所有 XMLHttpRequest 中使用它吗?

还是每次发出 XMLHttpRequest 时都需要调用它?

标签: facebookfacebook-instant-games

解决方案


您可以只调用一次,但是这将不允许您验证issued_at时间或加密自定义有效负载。


推荐阅读