Page 1 of 1
Facebook/Google Login in Renpy App game
Posted: Fri Sep 02, 2022 3:21 am
by Bruni Multimedia
As per title, is it possible to enable a Google/Facebook login for a ren'py mobile game?
I just want the game to know who's playing it, storing that info in the .persistent file and using it to send data through google analytics.
Thanks!
Re: Facebook/Google Login in Renpy App game
Posted: Fri Sep 02, 2022 5:49 am
by Andredron
Re: Facebook/Google Login in Renpy App game
Posted: Mon Sep 05, 2022 1:31 pm
by PyTom
I don't think it makes sense to use the google apis directly in a Ren'Py game. (They are more a server side thing.)
It might be possible to get this information using pyjnius or pyobjus, but this isn't something that's built into Ren'Py.
Re: Facebook/Google Login in Renpy App game
Posted: Mon Sep 05, 2022 3:51 pm
by Andredron
Bruni Multimedia wrote: ↑Fri Sep 02, 2022 3:21 am
As per title, is it possible to enable a Google/Facebook login for a ren'py mobile game?
I just want the game to know who's playing it, storing that info in the .persistent file and using it to send data through google analytics.
Thanks!
Once I suggested enabling such apis by default, but Mr. Python answered like this
PyTom wrote: ↑Tue May 24, 2022 1:07 pm
In general, things like these don't make sense to include in a game. Without looking too close at any one of these, I'd expect them to require some sort of API key to access the social network site. If such a key is included, then anyone that key could impersonate you to spam.
What you generally want is to have your own website, that intermediates access between the game and the social networks. So your game would use the built-in requests module to talk to your webserver to verify the social post has been done, and then your website will take care of contacting the social networks to request the entire data that you need.
This also lets you update the supporting website in the (likely) even that one of the social networks changes its API, and not have to deploy that change to all the games in the field.
Roughly speaking, for the sake of the security of user data, most likely they will not answer you exactly how to do it, just hint where to look, and you will continue on your own