This works for me, just replace 600018347 with your app id and soccermazs2-ipad to your app name:
local function soccermazes(event)
if event.phase == “release” then
audio.play( tapSound )
if event.id==1 then
showRanksUrl2=“https://itunes.apple.com/us/app/soccermazes2-ipad/id600018347?ls=1&mt=8”
elseif event.id==2 then
showRanksUrl2=“https://itunes.apple.com/us/app/soccermazes2/id600301044?ls=1&mt=8”
end
native.showWebPopup(showRanksUrl2)
end
end
smButton = ui.newButton{
defaultSrc = “appleicon.png”,
defaultX = 150,
defaultY =52,
overSrc = “appleicon.png”,
overX =150,
overY = 52,
onEvent = soccermazes,
id = 1,
text = “”,
font = “Helvetica”,
textColor = { 255, 255, 255,255 },
size = 24,
emboss = false
}
smButton.x = 245
smButton.y = 50
smButton.xScale = 0.8
smButton.yScale = 0.8
hudGroup:insert( smButton )
[import]uid: 34373 topic_id: 18793 reply_id: 142256[/import]