- Home /
How to direct user to an specific Instagram page
Hello everyone does anybody know how to open an Instagram page from unity? by that i mean opening Instagram app and displaying an specific Instagram profile page to user (e.g. developer studios page on Instagram), I have no idea how to do such a thing, any ideas??
Answer by asajadi84 · Apr 21, 2016 at 09:16 PM
Application.OpenUrl ("instagram://user?username=USERNAME");
you should use this custom URL scheme instead of http
Answer by WickeDHypnO · Aug 11, 2015 at 01:56 AM
Have you tried Application.OpenURL ()
? It opens a link in a browser - thats what documentation says, but as with many links like youtube.com etc. Android phones can ask with what you want to open the link. I personally haven't tried this but it seems like a way to do this kind of thing. Usage:
function OpenMyUrl () {
Application.OpenURL ("http://unity3d.com/");
}
thank you for the response, i tried it before with the same assumption but Instagram app wasn't in the list (only browsers), strange enough, putting a photo's URL will get the Instagram app in the list but that doesn't work the same way for the profile URL.
Answer by devdreamstudio · Aug 13, 2017 at 12:44 PM
Hey there , you can use this code :
1-add this c# code to the project 2-add it to an empty object in the scene , 3-make a button and call the rateandinsta script and paste your instagram link as : instagram://user?username=yourusernameENJOYIT
using UnityEngine;
using UnityEngine.UI;
using System.Collections;
public class rateandinsta : MonoBehaviour {
void start() {
}
// this is how you will be able to add your instagram link
public void SocialButton(string url) { Application.OpenURL(url); }
}
Your answer
