Bennu Game Development

English Forums => Platforms => Android => Topic started by: Grew on August 03, 2016, 08:32:20 AM

Title: Share score
Post by: Grew on August 03, 2016, 08:32:20 AM
Hi,
I'm about to release my game, but I'm sad that I will never know if people succeed to finish it.
I wondering if there is a way to share the score in Twitter or Facebook directly from my game.
For exemple :
"My hight score on GAME_NAME is XXXX, can you beat me ?"


Any ideas to afford this (with PixTudio) ?
Title: Re:Share score
Post by: gecko on August 04, 2016, 01:48:28 AM
The solution i'm thinking of is using an intermediate web server where you send the scores, and then from that server you can post them to the social networks.

For example you can run PHP or Ruby on the web server, and there are lots of libraries or scripts that can authenticate and publish on facebook or twitter.

I don't know if it's possible DIRECTLY through bennugd, but i'm positive sure that is possible using an intermediate server. (I've done this using a NodeJS server, for example).
Title: Re:Share score
Post by: Grew on August 04, 2016, 03:43:03 PM

Thank you for your reply.


Is there a way to open an url in PixTudio ? The OS will be able to open this url with the associated app. For exemple if PixTudio send a twitter url request on Android, I think Android will open it with the Twitter App.
Title: Re:Share score
Post by: l1nk3rn3l on August 04, 2016, 09:01:17 PM
Please add a new post with ...   Bennugd Christmas Wish List..


;D
Title: Re:Share score
Post by: Grew on August 05, 2016, 11:29:14 AM
Haha !


You're right ! :P
Title: Re:Share score
Post by: blabla on October 07, 2016, 08:54:25 PM
That's how i did for my BennuGD games (or even my C Android games), Pixplantilla can open URLs or even URIs !
I'm not sure if the recent Pixplantilla can do this though...

For twitter, you can open it up inside of a browser :
exec(_P_NOWAIT, "https://twitter.com/intent/tweet?text= My score is : "+(int)myhighscore+". I'm so great #sogreat", 0, 0);

Or even better, using the official twitter application:
exec(_P_NOWAIT, "twitter://post?message=My score is : "+(int)myhighscore+". I'm so great #sogreat", 0, 0);