question

mehmet-cang avatar image
mehmet-cang asked

How can i get Player's json data using PlayfabID,How can i get Player's json data using Playfab ID

I want to create detailed leaderboard for our game. I thought i can get Player's json data who in top 10 in leaderboard. I've getted Player's playfab id who in top 10. But i cant reach Player's json data using playfabid.

In example,



PlayFabClientAPI.GetUserData(new GetUserDataRequest()

{ PlayFabId = "988BC628E808FC95",

Keys=null },

OnGetDataSuccess, OnError);

}



void OnGetDataSuccess(GetUserDataResult result)

{ if (result.Data ==null || !result.Data.ContainsKey("AllFlags"))

{ Debug.Log("There is no data"); }

else { Debug.Log("There is a data"); } }

Console Message : There is no data

,

I want to create detailed leaderboard for our game. I thought i can get Player's json data who in top 10 in leaderboard. I've getted Player's playfab id who in top 10. But i cant reach Player's json data using playfabid.

In example,

PlayFabClientAPI.GetUserData(new GetUserDataRequest()

{ PlayFabId = "988BC628E808FC95",

Keys=null },

OnGetDataSuccess, OnError);

}

private void OnGetDataSuccess(GetUserDataResult result)

{ if (result.Data ==null || !result.Data.ContainsKey("AllFlags"))

{ Debug.Log("There is no data"); }

else { Debug.Log("There is a data"); } }

Console Message : There is no data

Player Data
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
Gosen Gao avatar image
Gosen Gao answered

Your code works in my test, please make sure that the permission of the data you want to get is set to “Public”.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.