i am trying to retirieve a player score using facebook API in Unity. this is the code that i am using :
if(FB.IsLoggedIn){
FB.API("/me/scores", Facebook.HttpMethod.GET, scoreRetrived);
}
public void scoreRetrived(FBResult result){
var dict = Json.Deserialize(result.Text) as Dictionary<string,object>;
print (dict["score"]);
}
and this is the result of FBResult result.text :
{“data”:[{“user”:{“id”:“1000015239203”,“name”:“AAA BBB”},“score”:30,“application”:{“name”:“game”,“id”:“2419296161993”}}]}
how can i access the score ?!!! it’s not working for me a have an error because the Key doesnt existe !