G
G
Guverner2016-06-30 09:47:33
Classmates
Guverner, 2016-06-30 09:47:33

How to make sdk.reportStats work?

sdk.reportStats doesn't work. Error coming {"method":"error","result":null,"data":{"error_code":100,"error_msg":"PARAM : Invalid parameter stats value : ","error_data ":null}}.
The application is internal, has not passed moderation and is not added to the white list.
I do it with

var myJSONObject = {
      "method": "sdk.reportStats",
      "stats": {
        "time": 1234567890,
        "stats": [
          {
          "id": "launch.count",
          "time": 1234567890,
          "data": [
            "1"
          ],
          "type": "counter"
          }
        ],
        "version": "1.0"
      }
    };
    
    FAPI.Client.call(myJSONObject, function(method,result,data) {
      var rez = null;
      
      if(data) rez = {"method":method, "result":result, "data":data};
      else rez = {"method":method, "result":result};
      
      console.log(JSON.stringify(rez));
    });

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
dgreen, 2016-07-04
@Guverner

The "stats" parameter must be the string of the resulting JSON.stringify

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question