Noctua Platform

Social Media

Noctua as publisher have contents that may need to be delivered to users, like Announcements, Rewards, Social Media, or even Customer Service.


Implementation to show Social Media

Here's how to show Social Media content in your game,

using com.noctuagames.sdk;
using Cysharp.Threading.Tasks;
using UnityEngine;

public class AuthenticationManager : MonoBehaviour
{
    private void Awake()
    {
        StartCoroutine(Authenticate().ToCoroutine());
    }

    private async UniTask Authenticate()
    {
        try
        {
            await Noctua.Platform.Content.ShowSocialMedia();
            Debug.Log("Social Media content shown");
        } catch (Exception e) {
            if (e is NoctuaException noctuaEx)
            {
                Debug.Log("NoctuaException: " + noctuaEx.ErrorCode + " : " + noctuaEx.Message);
                outputConsole.text = "NoctuaException: " + noctuaEx.ErrorCode + " : " + noctuaEx.Message;
            } else {
                Debug.Log("Exception: " + e);
                outputConsole.text = "Exception: " + e;
            }
        }
    }
}

Best Practices

Call the Noctua.Platform.Content.ShowSocialMedia() method when you want to show the links to the game's social media accounts.

Note

Error Handling: Always check for errors in the callback and handle them appropriately. See NoctuaException for more details.

Previous
Showing Rewards content