Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Facebook Instant Games

Discussion in '2D' started by mohmedfakhry20121, Sep 15, 2020.

  1. mohmedfakhry20121

    mohmedfakhry20121

    Joined:
    Jul 11, 2020
    Posts:
    1
    Hi everyone, I made an Android game and i didn't publish it yet how can i publish this game in facebook instant games and implement facebook ads?
     
  2. Dante_

    Dante_

    Joined:
    Apr 2, 2015
    Posts:
    14
    I find this a bit weird that ther is absolutely no proper unity documentation on how to publish a facebook game.

    All I see on the doc is an exemple using the Facebook export, that does even exist anymore in the build export option...

    All I could find is that

    + you need the facebook sdk to access the fb api.

    + Create a Fb app on facebook developer website ( you'll need to fill several fields)
    You'll get an APP Id


    +Then in unity you can set the app id in the Facebook sdk panel

    + Export your game using 'webgl export' to make it a web game


    Then when trying to export your game, if you try to import this game in Facebook publish panel you'll get an error telling you are not using there CDN.

    And from there you'll be stuck.

    So I have seen on some obscure video from random person that you need specifics files in you exported project.

    There is absolutely nothing documented about that.

    You''ll need to add some json config file at the root of the project and another one in the build folder. And also to add some code index.html to tell your game to load and display a progress bar while loading

    You ll also need to add at the top of the file a js link to the Facebook cdn

    I didn' t succeded yet.
    If I make it I ll make a video explaining what you have to do.

    Unity could you please make a simple up-to-date tutorial or documentation on how to publish/make a very simple game to facebook ?
     
  3. vanshika1012

    vanshika1012

    Joined:
    Sep 18, 2014
    Posts:
    48
    Any success. I am too stuck on this. I cannot believe its 2021 and still we dont have a good access to facebook instant game.
     
  4. MelvMay

    MelvMay

    Unity Technologies

    Joined:
    May 24, 2013
    Posts:
    10,521
    You're not likely to get a discussion about a platform on the 2D forum which has nothing to do with that topic at all. I personally have no idea about Facebook support. Maybe one of the Platform sub-forums would be better or maybe a General Discussion forum.