Hosting – Facebook Games – Documentation – Meta for Developers

Mục lục bài viết

How games appear on Facebook

In your app settings, there’s a field for Facebook Web Games URL. This field configures the iframe that loads when a player loads your game. This puts you in complete control your game, and you’re free to update versions and content at your own release cycle. See your App Settings here.

When a player on Facebook.com loads your game, Facebook will make an HTTP POST request to the Facebook Web Games URL provided under App Settings. The response to this request should be a full HTML response that contains your game client. You can use the Facebook SDK for JavaScript to authenticate users, interact with the frame, and to access dialogs in-game, so be sure to include that in your game’s HTML. See here for more information on Login for Games On Facebook.

The iframe where your game appears on Facebook.com

The HTTP POST request made to your Fcaebook Web Games URL will contain additional parameters, including a signed_request parameter that contains the player’s Facebook identity if they’ve granted basic permissions to your app. If a player is new, the signed_request parameter value will be useful to validate that this request did indeed come from Facebook. Read more about signed requests in the Login for Games on Facebook guide.

Xổ số miền Bắc