Rate application in app store

I'm trying to conceive a way to link users to the app store from a Corona application.

I tried a web popup with links like

itms://itunes.apple.com/WebObjects/MZStore.woa/wa/viewContentsUserReviews?id=339933022&onlyLatestVersion=true&pageNumber=0&sortOrdering=1

http://itunes.com/apps/NinJump

or

http://itunes.apple.com/app/id339933022

which don't work.

Has anyone figured out a way to achieve something like this?

Err. Forgot to mention that the goal of linking to the app store is to have the users rate the app (which most popular apps offer sooner or later).

This was basically lifted from another example in the contributed code:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
local function testNetworkConnection()
    local netConn = require('socket').connect('www.apple.com', 80)
    if netConn == nil then
        return false
    end
    netConn:close()
    return true
end
        
local function rateMe(event)
    local DEVICE = system.getInfo ( "environment" )
    ReviewURL = "itms-apps://ax.itunes.apple.com/WebObjects/MZStore.woa/wa/viewContentsUserReviews?type=Purple+Software&id=434030469"
    if DEVICE == "simulator" then
        print ( "Cannot spawn this URL in the simulator" )
    else
        if testNetworkConnection() then
            system.openURL ( ReviewURL )
            hasRated = 1
            saveSettings()
        end
    end
end
views:1499 update:2011/9/29 19:21:19
corona forums © 2003-2011