Method signature

Method allows a game to suggest user to rate it:

     

Метод доступен только при запуске игр на платформе android

FAPI.invokeUIMethod("showRatingDialog");

Usage example

function requestDesktopIcon() {
FAPI.invokeUIMethod("showRatingDialog");
}

Ratings API

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

Пример коллбека

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”

Коллбек 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”