Three Brothers Apps Posted September 10, 2016 Share Posted September 10, 2016 down votefavorite I am trying to implement a Google Play leaderboard in a very basic javascript game: I have included what I think are the necessary meta tags, signon, and scripts in my index.html file: <meta name="google-signin-client_id" content="xxxxxxxxxxxx-xxxxxxxxxxx.apps.googleusercontent.com" /> <meta name="google-signin-cookiepolicy" content="single_host_origin" /> <meta name="google-signin-callback" content="signinCallback" /> <meta name="google-signin-scope" content="https://www.googleapis.com/auth/games" /> I've included a standard google sign on button: <div class="g-signin2" data-onsuccess="onSignIn"></div> I've included the google apis: <script src="https://apis.google.com/js/client.js"></script> <script src="https://apis.google.com/js/platform.js" async defer></script> In my games.js file, I've included the call to submit the scores by: gapi.client.load('games','v1',function(response) { var request2 = gapi.client.games.scores.submit( {leaderboardId: "xxxxxxxxxx", score: 50} ); request2.execute(function(response) { console.log(response); // blah blah blah }) But nothing ever shows up on the leaderboard. The console log spit out what I'm expecting. I've confirmed the clientID and leaderboardID. For some reason the scores aren't actually being submitted (or if they are, they aren't being processed). Anyone with experience setting this up available for some pointerd? Note that this is not a chrome app/extension - it's a pure javascript game hosted on a web server. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.