RenTweet is a framework which is built upon the Tweepy Python library, and allows for Twitter status updates within games. The purpose is to allow players to update their friends about their progress in a game, and at the same time will hopefully help to promote your game and Ren'Py.
As Twitter no longer allows for simple authentication (storing a username and password), this framework uses OAuth to handle authentication. The auth information provided once a user approves the application is stored in a persistent variable. RenTweet is released under the MIT license, which means that you are welcome to use it in your games or modify it as you see fit.
Usage:
RenTweet is only supported with Ren'Py 6.11.0, as it makes use of the new screen functionality.
To play the short Demo included, unzip the RenTweet folder and place it within your Ren'Py projects directory to play it. On the demo game's main menu, you should see a "Twitter Options" menu option where you can configure Twitter (this can also be set up while right clicking during the game). If you have done this, it will prompt you to send a Twitter status update towards the end of the demo.
To utilize the framework in your own games, copy the files listed in the README.txt to your own project's folder and make the necessary adjustments to the rentweet_game_info method.
If you want to register your game as as its own Twitter app, which I highly recommend if you are making a commercial project and/or you make heavy modifications to this code, you must also modify the rentweet_public_keys to use your own API keys.
To send a status update from within the game, simply use the following code:
Code: Select all
$ Rentweet.tweet("<Your Tweet>")I am currently looking for feedback and suggestions on any functionality / performance improvements, as well as any bug reports you might have. There are a few things I would like to improve about the Framework in updated releases, but at the moment it is fully functional for basic status updates. I will probably be improving the documentation when I get the chance to be a bit more friendly.

