# How to use Facebook Instant Games extension?

**URL:** <https://forum.defold.com/t/how-to-use-facebook-instant-games-extension/68524>\
**Category:** Questions\
**Created:** [May 26, 2021, 4:12pm UTC](https://forum.defold.com/t/how-to-use-facebook-instant-games-extension/68524 "2021-05-26T16:12:50Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jerry](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/jerry/32/25113_2.png) [@jerry](https://forum.defold.com/u/jerry)\
**Post date:** [May 26, 2021, 4:12pm UTC](https://forum.defold.com/t/how-to-use-facebook-instant-games-extension/68524/1 "2021-05-26T16:12:50Z")

</div>

Hello.

I managed to learn the basics of Defold. I like it a lot 🙂 !  
I made myself a simple game.  
However, I have a problem with the extension under Facebook.  
I don’t understand this description [Facebook Instant Games extension](https://defold.com/extension-fbinstant/)

1. I created myself a new app (game) on [https://developers.facebook.com/](https://developers.facebook.com/)
2. I added APP ID to game.project
3. I added l fbinstant folder to my project

I don’t know how to implement FB API and run my game.  
Can I test such game in IDE or I have to upload game to Facebook ?

Can someone send me a simple example e.g. with a button for facebook ?  
The tictactoe example is too difficult for me. I will be grateful

---

<div class="post-metadata">

**Author:** ![britzl](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/britzl/32/23_2.png) [@britzl](https://forum.defold.com/u/britzl)\
**Post date:** [June 1, 2021, 12:22pm UTC](https://forum.defold.com/t/how-to-use-facebook-instant-games-extension/68524/2 "2021-06-01T12:22:49Z")

</div>

> [@jerry](#):
>
> I don’t understand this description [Facebook Instant Games extension](https://defold.com/extension-fbinstant/)

Which part of the instructions are you struggling with?

> [@jerry](#):
>
> I don’t know how to implement FB API and run my game.

I’ve updated the documentation a bit to mark some of the steps under [Installation](https://defold.com/extension-fbinstant/#installation) as optional.

> [@jerry](#):
>
> Can someone send me a simple example e.g. with a button for facebook ?  
> The tictactoe example is too difficult for me. I will be grateful

I’ve also created a super bare bones example “game” with just the init code for Facebook Instant Games and nothing more:

> **[extension-fbinstant/examples/balls at master · defold/extension-fbinstant](https://github.com/defold/extension-fbinstant/tree/master/examples/balls)**
>
> Facebook Instant Games extension for the Defold game engine - defold/extension-fbinstant

> [@jerry](#):
>
> Can I test such game in IDE or I have to upload game to Facebook ?

You can test the game from a local server without upload to Facebook. This is described in the official documentation:

> **[Test, Publish, Share - Facebook Games - Documentation - Meta for Developers](https://developers.facebook.com/docs/games/build/instant-games/get-started/test-publish-share)**

---

<div class="post-metadata">

**Author:** ![britzl](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/britzl/32/23_2.png) [@britzl](https://forum.defold.com/u/britzl)\
**Post date:** [June 3, 2021, 1:30pm UTC](https://forum.defold.com/t/how-to-use-facebook-instant-games-extension/68524/3 "2021-06-03T13:30:26Z")

</div>

I’ve updated the Tic Tac Toe example game and moved it to a separate repository. The new version does not use any backend service for game state and is instead passing game state in the entry point data of each game update. New version:

[https://github.com/defold/game-xoxo-fbinstant](https://github.com/defold/game-xoxo-fbinstant)
