0

I am using this method FBInstant.getLeaderboardAsync ("test"), with any other position table whether contextual or not, I have this error i {code: "LEADERBOARD_NOT_FOUND", message: "A leaderboard with the name" test "was not found"}

an image of the error

Can someone tell me how the leaderboards are obtained? Or are they in custody ?. Or should I send my application to review to access it?

here the code:

FBInstant.getLeaderboardAsync('test')
        .then(leaderboard => {
            console.log(leaderboard.getName());
            return leaderboard.setScoreAsync(42);
        })
        .then(() => {
            console.log('Score saved')
        })
        .catch(error => console.error(error));

FBInstant.getLeaderboardAsync('test.'+ contextID)
        .then(leaderboard => {
            console.log(leaderboard.getName());
            return leaderboard.setScoreAsync(score);
        })
        .then(() => {
            console.log('Score saved')
        })
        .catch(error => console.error(error));

I'm using the sdk 6.0

Thank you


I already did it and it does not work. A question, does it work for you? What steps did you follow to create your instant games app? Or maybe it takes a few days to create the table. I found this in the documentation.

LEADERBOARD_NOT_FOUND string object: a position table with the requested name was not found. The leaderboard does not yet exist or the name does not match any of the leaderboard settings registered for the game.

As if I had not created the leader board, and I'm not mistaken in the name, either contextual or non-contextual.

At the end of the day, I think that my application does not connect with the Facebook database, and I ask what are the steps you followed?

I did the following: create my application, perform the basic configuration, added the product of instant games, create the leader boards, I uploaded my game to web hosting

that's all I did, and even if I try it with: https://www.facebook.com/embed/instantgames/APP_ID/player?game_url=https://localhost:8080, with a table of leaders without context

or

direct from messenger in a conversation using table of leaders with context I get the same error in the console

nshmura
  • 5,940
  • 3
  • 27
  • 46
  • We believe a bug may be effecting this temporarily and are investigating further. While inconvenient, creating a new app ID has previously been shown to correct the issue. Apologies for the inconvenience. – Chris Hawkins Mar 25 '18 at 22:22

1 Answers1

0

Make sure you have created leader board in App's setting enter image description here

And contextID is not null. You can get contextID by this method FBInstant.context.getID()

tuananh
  • 747
  • 8
  • 17
  • 1
    I already did it and it does not work. A question, does it work for you? What steps did you follow to create your instant games app? Or maybe it takes a few days to create the table. – World Affairs Mar 23 '18 at 18:03
  • I just follow link https://developers.facebook.com/docs/games/instant-games/guides/using-leaderboards and it works for me. What is your log FBInstant.context.getID() – tuananh Mar 24 '18 at 04:13