Microsoft Azure PlayFab logo
    • Multiplayer
    • LiveOps
    • Data & Analytics
    • Add-ons
    • For Any Role

      • Engineer
      • Designer
      • Executive
      • Marketer
    • For Any Stage

      • Build
      • Improve
      • Grow
    • For Any Size

      • Solo
      • Indie
      • AAA
  • Runs on PlayFab
  • Pricing
    • Blog
    • Forums
    • Contact us
  • Sign up
  • Sign in
  • Ask a question
  • Spaces
    • PlayStream
    • Feature Requests
    • Add-on Marketplace
    • Bugs
    • API and SDK Questions
    • General Discussion
    • LiveOps
    • Topics
    • Questions
    • Articles
    • Ideas
    • Users
    • Badges
  • Home /
  • Bugs /
avatar image
Question by Doronhn · Oct 13, 2020 at 10:54 PM · apisLeaderboards and Statistics

GetFriendLeaderboard allwase return 0

Hey,

when i am calling PlayFabClientAPI.GetFriendLeaderboard i am alwase get 0 result.

request:GetFriendLeaderboardRequest getFriendLeaderboardRequest = new GetFriendLeaderboardRequest()

        {
            MaxResultsCount = 5,
            StatisticName = $"lEVEL_STATISTICS_NAME",
            ProfileConstraints = ProfileConstraints
        };


PlayFabClientAPI.GetFriendLeaderboard(getFriendLeaderboardRequest, (result) =>
        {

            Debug.Log(result.Leaderboard.Count());

        }, (error) =>
        {
            Debug.LogError(error);
        });

i am trying to call the API when i am logged in when this PlabfabID = "4720617DB4FEF450" , and he has friends:

what do i do wrong?

all the other request working (get leaderboard).

friends.png (25.4 kB)
Comment

People who like this

0 Show 0
10 |1200 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

1 Reply

· Add your reply
  • Sort: 
avatar image
Best Answer

Answer by Sarah Zhang · Oct 14, 2020 at 07:04 AM

We tested this API in our testing title, this API works fine. Could you please confirm whether these two friends have data under the corresponding leaderboard? If there are no these two rankings in the targeted leaderboard, the Leaderboard field in the response of GetFriendLeaderboard would be an empty array. You can navigate to these two player’s [Statistic] page to check their Statistics info.

Comment

People who like this

0 Show 7 · Share
10 |1200 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Doronhn · Oct 14, 2020 at 07:50 AM 0
Share

Hey,

1. this players return when i call GetLeaderboard. so they have stats.

2. both of them had statistics as you can see:

friends1.png (49.5 kB)
avatar image Sarah Zhang ♦ Doronhn · Oct 14, 2020 at 09:32 AM 0
Share

Could you please provide your TitleID?

avatar image Doronhn Sarah Zhang ♦ · Oct 14, 2020 at 09:39 AM 0
Share

TitleID: 1660

Show more comments
avatar image Sarah Zhang ♦ Doronhn · Oct 20, 2020 at 07:45 AM 0
Share

Apologies for the delayed reply. We tried to create a testing account in your title, add these two players as friends, then call the GetFriendLeaderboard API. It can work fine.

Could you please check whether you use the correct statistic name in the request body? This is our testing request body.

{
  "StatisticName": "Levels"
}
avatar image Doronhn Sarah Zhang ♦ · Oct 20, 2020 at 08:28 AM 0
Share

Yes, i have double check again.

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Navigation

Spaces
  • General Discussion
  • API and SDK Questions
  • Feature Requests
  • PlayStream
  • Bugs
  • Add-on Marketplace
  • LiveOps
  • Follow this Question

    Answers Answers and Comments

    2 People are following this question.

    avatar image avatar image

    Related Questions

    GetLeaderboardAroundPlayer api call failing 0 Answers

    UE4 continually crashing 1 Answer

    Leaderboard limits? No where does it say this. 2 Answers

    Leaderboards AvatarUrl and LinkedAccounts are always Null. 2 Answers

    UpdatePlayerStatistics no longer working 1 Answer

    PlayFab

    • Multiplayer
    • LiveOps
    • Data & Analytics
    • Runs on PlayFab
    • Pricing

    Solutions

    • For Any Role

      • Engineer
      • Designer
      • Executive
      • Marketer
    • For Any Stage

      • Build
      • Improve
      • Grow
    • For Any Size

      • Solo
      • Indie
      • AAA

    Engineers

    • Documentation
    • Quickstarts
    • API Reference
    • SDKs
    • Usage Limits

    Resources

    • Forums
    • Contact us
    • Blog
    • Service Health
    • Terms of Service
    • Attribution

    Follow us

    • Facebook
    • Twitter
    • LinkedIn
    • YouTube
    • Sitemap
    • Contact Microsoft
    • Privacy & cookies
    • Terms of use
    • Trademarks
    • Safety & eco
    • About our ads
    • © Microsoft 2020
    • Anonymous
    • Sign in
    • Create
    • Ask a question
    • Create an article
    • Post an idea
    • Spaces
    • PlayStream
    • Feature Requests
    • Add-on Marketplace
    • Bugs
    • API and SDK Questions
    • General Discussion
    • LiveOps
    • Explore
    • Topics
    • Questions
    • Articles
    • Ideas
    • Users
    • Badges