FB Instant Games - Leaderboard

0 favourites
From the Asset Store
A small template showing how to build a firebase ranking
  • Has anyone got the Leaderboard working for FB Instant Games?

    I'm loading the leaderboard like this in C3, but it's not working:

    Leaderboard Name in FB Dashboard is the same:

    High Scores

    I've tried a 'contextual' leaderboard also, but the same result (nothing loads when leaderboard button is pressed):

    UPDATE:

    I made a working leaderboard for anyone to use. See later post for details.

    http://s000.tinyupload.com/index.php?file_id=72443483567597873242

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Same problem here. Also all share functions doesn't work.

    Non-interface functions like saving scores and analytics works fine, but the only interface function that works here is 'Creat home screen shortcut'. (Interface functions I mean functions that calls facebook interface)

    Don't know if its something wrong we are doing. So would be good to have the documentation for this plugin asap.

  • The event you show means you will load leaderboard data. you will not "open" anything. so no, you will not see that anything happens if you asign that to a button..

    use that event as a start though.

    then use

    On leaderboard loaded event-> then you can populate the leaderoard data into textfields for instance.

    Like

    set text: InstantGames.LeaderboardPlayerNameAt(1)

  • Thanks for explaining.

    Ah that sucks, I thought it would be just like Android where it shows their generic leaderboard interface.

    As for the 'Share'. I've used the 'Invite' event, and it works fine for me (for inviting).

  • Thanks for explaining.

    Ah that sucks, I thought it would be just like Android where it shows their generic leaderboard interface.

    As for the 'Share'. I've used the 'Invite' event, and it works fine for me (for inviting).

    AFAIK there are no "generic leaderboard interface" on facebook? All games has this built in, within the game. Which you will load. (look at the API https://developers.facebook.com/docs/ga ... aderboards )

    And this is only positive, since then you can design it as you want.

    Don't be so lazy <img src="{SMILIES_PATH}/icon_e_wink.gif" alt=";)" title="Wink">

    (just a side note, also in GooglePlay you can load leaderboard data and present it within the game. (works in the new plugin!)

    But yes, they also have "Open leaderboard" in their API.

  • lol yeah yeah maybe I'll make a generic leaderboard that all my games can inherit in the future, but until then I would like Facebook to spoon-feed me a builtin leaderboard

  • How are you guys posting your score to the leaderboard?

    My leaderboard doesn't seem to display anything at the moment.

  • How are you guys posting your score to the leaderboard?

    My leaderboard doesn't seem to display anything at the moment.

    You just use the 'Set score' action. then I guess the score you want to send is a variable. if the score you send is higher than the one alreade there it will update, otherwise not.

    Then retrieve the data as I described above.

    For me it works just fine.

  • > How are you guys posting your score to the leaderboard?

    >

    > My leaderboard doesn't seem to display anything at the moment.

    >

    You just use the 'Set score' action. then I guess the score you want to send is a variable. if the score you send is higher than the one alreade there it will update, otherwise not.

    Then retrieve the data as I described above.

    For me it works just fine.

    I am still having issues. See image URL below for my event page. Must be doing something wrong?

    ibb.co/cSnN77

    If anybody can show me their event setup, I would be grateful.

  • >

    > > How are you guys posting your score to the leaderboard?

    > >

    > > My leaderboard doesn't seem to display anything at the moment.

    > >

    >

    > You just use the 'Set score' action. then I guess the score you want to send is a variable. if the score you send is higher than the one alreade there it will update, otherwise not.

    >

    > Then retrieve the data as I described above.

    >

    > For me it works just fine.

    >

    I am still having issues. See image URL below for my event page. Must be doing something wrong?

    https://ibb.co/cSnN77

    If anybody can show me their event setup, I would be grateful.

    1. It takes time to fetch data. You cannot show data in the same event as you request it. First request, then verify you got it, then show it.

    2. You are only showing player ranked second and down... The first Index is zero. Always zero. And since you are testing your app (I guess) there will only be one player (you), and that index is not present in your game....

  • 1. It takes time to fetch data. You cannot show data in the same event as you request it. First request, then verify you got it, then show it.

    2. You are only showing player ranked second and down... The first Index is zero. Always zero. And since you are testing your app (I guess) there will only be one player (you), and that index is not present in your game....

    Yep :/ rookie mistake on my part

  • I have the leaderboard working now....however I am struggling where to put the event "Load Leaderboard" because there is always a delay, it does take a while to load the scores. This obviously does not help the flow of the game.

  • I have the leaderboard working now....however I am struggling where to put the event "Load Leaderboard" because there is always a delay, it does take a while to load the scores. This obviously does not help the flow of the game.

    i have it in the "on start of layout" or what the name is again on the "main" screen. same screen as the leaderboard. then "on leaderboard loaded" I populate the board. Sometimes it goes instantly, sometimes it take a second. depending on the connection of the phone

  • > I have the leaderboard working now....however I am struggling where to put the event "Load Leaderboard" because there is always a delay, it does take a while to load the scores. This obviously does not help the flow of the game.

    >

    i have it in the "on start of layout" or what the name is again on the "main" screen. same screen as the leaderboard. then "on leaderboard loaded" I populate the board. Sometimes it goes instantly, sometimes it take a second. depending on the connection of the phone

    Thanks, that seemed to work

  • >

    > > I have the leaderboard working now....however I am struggling where to put the event "Load Leaderboard" because there is always a delay, it does take a while to load the scores. This obviously does not help the flow of the game.

    > >

    >

    > i have it in the "on start of layout" or what the name is again on the "main" screen. same screen as the leaderboard. then "on leaderboard loaded" I populate the board. Sometimes it goes instantly, sometimes it take a second. depending on the connection of the phone

    >

    Thanks, that seemed to work

    I have a global variable for a score in my game. And I created a Leaderboard for the game in Facebook Instant Game settings. (global not contextual) How do I translate that into a score on a Facebook Leaderboard?

    Can you or someone list the set of events to get the Leaderboard to work? or post a screenshot of their events? or copy/paste the events? or is there a tutorial written on this?

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)