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. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

webgl how to host for facebook

Discussion in 'WebGL' started by fredduguay, Jan 12, 2016.

  1. fredduguay

    fredduguay

    Joined:
    Jan 12, 2016
    Posts:
    4
    Hello,
    Looking at releasing a game on facebook but it seems this is harder than simply hosting a website.

    I've been looking at amazon aws and using their system to host and provide the webpage but there's no simple way to do so to allow facebook's POST request to fetch the webgl page.

    What should I look into in order to have a server that can work with facebook? Thanks in advance!
     
  2. heroichippo1

    heroichippo1

    Joined:
    Mar 30, 2015
    Posts:
    36
    The most important part of your question is regarding how to respond to the POST request over https://.

    You will need a web server to respond to the POST request, and depending on the server system you have one of two solutions.

    If your server is running APACHE, than you can easily configure the request to the folder to respond with the index.html

    However if your web server is running NGINX, it doesn't allow this, so you need to write a php script that will forward POST requests from that url to your index.html.

    once you've got your web server responding with your index, the rest is as simple as any other web site setup.
     
  3. Landci

    Landci

    Joined:
    Aug 28, 2012
    Posts:
    33
    Any details on how to handle that POST request??
    I tried to host it with Amazon S3 but this is also not working because of the POST request.
    I cannot find anything about this on Facebook or Unity or Amazon, in how to handle it to make that work.
     
  4. mog-mog-mog

    mog-mog-mog

    Joined:
    Feb 12, 2014
    Posts:
    266
    @Landci , I am also trying to solve the same, did you find any solution yet?