- Home /
Open Instagram Profile With Button
Hi, I want to open an Instagram profile with a button, but the following code does not work, you can help.
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class contact : MonoBehaviour {
public void insta () {
string instagram = "url:instagram://user?username=the.msy";
Application.OpenURL(instagram);
}
}
Answer by neetesh6499 · Feb 19, 2018 at 05:38 AM
Hi @unity_350semih , you haven't mentioned if you're trying to open instagram on a browser, or through the app in a mobile device, however the way you've implemented your current code, i'm going to assume you're trying to open the instagram app. Here, this should help:- https://answers.unity.com/questions/1025926/how-to-direct-user-to-an-specific-instagram-page.html
If you're trying to open it in a browser then just use: https://docs.unity3d.com/ScriptReference/Application.OpenURL.html
Hope this helps you. Good Luck :) Regards.
I tried it but it did not work. I want to open the application directly.
Did an error occur? or it is just not opening? could you post your code where you are implementing this?
Your answer
