I'm talking about mobile.
I believe a plugin will be a good choice.
For example take a look on phaser, have already about wechat:
indienova.com/indie-game-development/run-phaser-on-wechat-game-platform (with a translator will you read more in details)
The links are just examples. I don't know what exactly will help you.
If you already find something from the official links, it's ok.
If not, Let me know if you want to google more specific for you.