Link to Instagram/web from mobile ot working
Hi!
I've tried to make a simple button to link to Instagram/web from my mobile app (iOS & Android) but I can't get it to work. I'm a beginner so it's probably something small and stupid I've missed :)
I created an empty game object and put a script "CallSocialApp" o it. The code can be seen below. On the "one click ()" on the button I've added the game object and put on "instagram://user?username=fridadrawsfaces" for Instagam link and "http://karlsignal.portfoliobox.net" for the web link. I've changed Internet Access to "Require" in Player Settings. It works in Unity editor but nothing happends when I run the app on my device (Huawei Honor 9). I've also tried it on Iphone 8.
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class CallSocialApp : MonoBehaviour {
public void CallInstagram(string socialappname)
{
Application.OpenURL(socialappname);
}
}
I'm using Unity 2017.3.1f1