Hi everyone, I need your help again.
In the gameover scene there’s a button to share user’ score on facebook, here is the code:
local fbAppID = “myAppID”
local function facebookListener(event)
if (event.type == “session”) then
if (event.phase == “login”) then
sessionToken = event.token
local response = event.response
print( “Collegamento Riuscito” )
facebook.showDialog( “link”, {
title = “Octaglow!”,
description = "I’ve just reach “…FbScore…” points playing Octaglow! Can you do better? "
})
elseif (event.type == “request”) then
local response = event.response
native.showAlert(“My Response”, response)
end
end
end
local function login ()
facebook.login( fbAppID, facebookListener, {“publish_actions”})
print(puntiFb)
end
local facebookBtn=display.newImageRect(sceneGroup,“Game/Pulsanti/facebook.png”,70,70)
facebookBtn.x=W/1.3; facebookBtn.y=H+H
facebookBtn:addEventListener(“tap”,login)
Unforunaly it doesn’t work as It should. When the button is clicked it only shares a link to the google play store without showing any message or title.
Can anyone help me?
Thanks =)