Could a “facebook instant” checkbox be added to the “html5” settings in game.project, which includes this file? Ideally with an option to select the file, so it can be edited easily.
Add a “Facebook Instant Game” mode to liveupdate.settings
Facebook Instant games can now be hosted on Facebook servers. If the live update files could be exported, without being zipped, directly to the HTML5 export folder, they could be included in the uploaded bundle, and loaded on demand by the Defold game.
It requires you to unzip the live update files from the “zip” folder and move them inside a “liveupdate” folder inside the HTML5 export folder. If the feature request was implemented, this would instead be entirely automated.
Side-note: The base url thing we discussed should probably be included in the instant games API somehow so you don’t have to do this yourself. I’m thinking that maybe there should be a /fbinstant/baseurl.lua module that you can require. Something like this:
local M = {}
local get_baseurl_js = [[
var hostname = window.location.hostname;
var pathname = window.location.pathname;
var r = /[^\/]*$/;
var base_url = pathname.replace(r, '');
return base_url;
]]
local base_url = nil
function M.get()
if not base_url then
base_url = html5.run(get_baseurl_js)
end
return base_url
end
return M