// YetiPoll for Unity. Add this file to your Assets folder. // // YetiPoll.Open("yp_live_pk_...", playerId); // // Opens the wall in the device browser, which works on every platform Unity // builds for. To keep it inside your game, load YetiPoll.WallUrl(...) in the // web view plugin you already use. // // Pass `signature` when your app requires signed wall links: compute it on // your server (HMAC-SHA256 of the user id with your secret key). using System; using UnityEngine; public static class YetiPoll { private const string Host = "https://yetipoll.com"; public static string WallUrl(string appKey, string userId, string signature = null) { var url = Host + "/wall?app=" + Uri.EscapeDataString(appKey) + "&user=" + Uri.EscapeDataString(userId); if (!string.IsNullOrEmpty(signature)) { url += "&sig=" + Uri.EscapeDataString(signature); } return url; } public static void Open(string appKey, string userId, string signature = null) { Application.OpenURL(WallUrl(appKey, userId, signature)); } }