[英]Does Facebook Instant Game only support getSignedPlayerInfoAsync for communication with game backend?
我需要在Facebook即時游戲中展示廣告,我所屬的公司希望通過與游戲服務器的通信獲得adID
來滿足試鏡的要求。 通過Facebook鏈接( https://developers.facebook.com/docs/games/instant-games/guides/bots-and-server-communication#backend ),該游戲只能按以下方式工作:
FBInstant.player.getSignedPlayerInfoAsync('custom_payload_supplied_with_request')
.then(function (result) {
// The verification of the ID and signature should happen on server side.
SendToMyServer(
result.getPlayerID(), // same value as FBInstant.player.getID()
result.getSignature(),
... //any additional parameters required for your server call
);
});
您可以使用任何基於fetch
/ XMLHttpRequest
的方法來訪問Instant Games中的后端系統,但是(根據Facebook的開發人員政策)您不能使用第三方廣告網絡。 受眾群體網絡是即時游戲唯一受支持的廣告網絡。
張思光的評論在下面有更多詳細信息,此處復制以備將來參考:
XMLHttpRequest
可以在幾乎每個地方進行請求,不受FBInstant.player.getSignedPlayerInfoAsync
限制
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.