Reputation: 29
I need to show ads in the Facebook instant game, the company I belong to hope get adID
through communication with game server to meet the audition. From Facebook link (https://developers.facebook.com/docs/games/instant-games/guides/bots-and-server-communication#backend), the game can only work like the following:
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
);
});
Upvotes: 1
Views: 733
Reputation: 784
You can use any fetch
/XMLHttpRequest
based method of accessing your backend systems in Instant Games, however you may not (according to Facebook's developer policy) use third-party ad networks. Audience Network is the only supported ad network for Instant Games.
Siguang Zhang's comment below has more details, copied here for future reference:
XMLHttpRequest
can be requested through nearly every place, not limited by FBInstant.player.getSignedPlayerInfoAsync
Upvotes: 1