Jump to content

Search the Community

Showing results for tags 'sign in'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • HTML5 Game Coding
    • News
    • Game Showcase
    • Facebook Instant Games
    • Web Gaming Standards
    • Coding and Game Design
    • Paid Promotion (Buy Banner)
  • Frameworks
    • Pixi.js
    • Phaser 3
    • Phaser 2
    • Babylon.js
    • Panda 2
    • melonJS
    • Haxe JS
    • Kiwi.js
  • General
    • General Talk
    • GameMonetize
  • Business
    • Collaborations (un-paid)
    • Jobs (Hiring and Freelance)
    • Services Offered
    • Marketplace (Sell Apps, Websites, Games)

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Website URL


Twitter


Skype


Location


Interests

Found 1 result

  1. Hello guys, So, I'm trying to implement the Google Play Services inside my game for the players challenge their friends with leaderboards scores and achievements. As I'm using Cordova, I have two ways: plugins or javascript libs. The first one is really old and limited, besides it not work well. And in the other hand we have the JS library of Google Web (REST) that you can find here https://developers.google.com/api-client-library/javascript/start/start-js and here https://developers.google.com/games/services/web/clientsetup. So, I'd tested both and the second is more interesting and complete than the first one. However, I can't load the OAuth2 to start using the REST calls and complete my game logic. Reading about this, I discovered that the webview don't save cookies, and when I have not set the parameter cookie_policy to "none" I get this error: And, when I set cookie_policy to "none", I have this error: I already have setup the lib in index.html <!-- google play games service api --> <script src="https://apis.google.com/js/client.js"></script> And in my MainMenu state, I'm doing the SignIn tests using this code: // google play sign in if (gapi) { console.log('GAPI is loaded'); gapi.client.setApiKey('<api_key>'); gapi.load('client:auth2', function () { gapi.auth2.init({ client_id: '<client_id>', cookie_policy: 'none', scope: 'https://www.googleapis.com/auth/games' }).then(function () { console.log('auth2 success'); }); }); } else { console.error('GAPI is not loaded'); } I would like to know if anyone knows about how to implement GPGS using Cordova?! I'd like to understand what I'm doing wrong! Any help will be great! Thank you!
×
×
  • Create New...