Using defold FB instance game extension(extension-fbinstant/README.md at master · defold/extension-fbinstant · GitHub) and screenshot extension we can send the message.Ex-
but I saw most of the FB instance game have this kind of score when it shares.
is there any way to create this kind of message using “fbinstant.update()” function.
*Use static image for background
*change score and profile pic dynamically
this is the function i have used
function shareChalengeHTML(self)
local player = fbinstant.get_player();
local wintexttext = " "..player.name .." Score "..self.score.." Marks.... Can you beat him?";
if screenshot.html5 then
screenshot.html5(function(self, base64_img)
-- share your base64 png
fbinstant.update(rxijson.encode({
action = "CUSTOM",
cta = "Play",
template = "play_turn",
image = base64_img,
text = wintexttext,
strategy = "IMMEDIATE",
}), function(self,success)
print("update_context success",success)
end)
end)
end
end
any suggestions?