Method signature

Method allows a game to suggest user to rate it:

     

    FAPI.UI.showRatingDialog()

Usage example

function showRatingDialog() {
    FAPI.UI.showRatingDialog()
}

Ratings API

In addition to this SDK method OK API allows you to get information about app’s ratings using following methods:

Callback examples

After a method is called user will be suggested to rate a game. Depending on his action on of following callbacks can be returned

Callback if user rated a game

method: “showRatingDialog”

result: “ok”

data: “5”

Callback if user declined to rate a game

method: “showRatingDialog”

result: “error”

data: “dismissed without rating”

Callback if dialog is already active

method: “showRatingDialog”

result: “error”

data: “layer already exists”

Callback if a feature is not supported for current device

method: “showRatingDialog”

result: “error”

data: “not_supported”