Share link and image via social media on Unity WebGL Game

Hello, basically I have a Unity fighting game for browser and I want players to be able to share the result of the fight and a link to play the game at the end of the match.
I found out about but I think it only supports android and iOS: GitHub - yasirkula/UnityNativeShare: A Unity plugin to natively share files (images, videos, documents, etc.) and/or plain text on Android & iOS

Thank you for your help.

2 Answers

2

You can use the Facebook API, either directly or using some plugin. There used to be an official unity plugin by Facebook, I am not sure whether it’s still maintained. But anyway, this would be done entirely by making http requests to the Facebook.
I think you could start here: Posts - Facebook Pages API - Documentation - Meta for Developers

Hi, did you find a solution?

Hi. In the end I used a html link like youtube on the browser does. Basicly go to any youtube video and click share, after that youtube will give you some share buttons, inspect the element of the social media you want to see how the link url is structured and open a similar one inside your game.