Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Link on a webpage to open instagram app

Is there a way to setup a link on a webpage, so that it tries to open the instagram app. (if it's installed)?

I'm trying to do this for a responsive website so I'm not in another "app".

This does not work:

<div>
    <a href="instagram//:media?id=434784289393782000_15903882">instagram://media?id=434784289393782000_15903882</a>
</div>

EDIT: I've corrected the typo as suggested in the answers and tested on iPhone. Work fine! Thanks @Krisrak! But I'm testing on Android Galaxy Nexus and it does not work. I see 2 messages, first "You must log out in order to reset your password." then it fades out and I see another saying "Sorry, we weren't able to load that link.".

Thanks!

like image 585
Sébastien Richer Avatar asked Jan 22 '14 22:01

Sébastien Richer


People also ask

How do I open links in-app instead of browser on Instagram?

Every android app will have list of urls that it can open. So you have to go to that app settings and tell that it should open in browser for the urls and not in the app. To do that go to Settings -> Apps -> scroll down to the app that you don't want URLs to open in -> Tap on 'Open by Default' and select always Ask.


3 Answers

1st Method

<a href="http://instagram.com/_u/{USERNAME}/">Link to Instagram Page</a>

  • Ask user to select application to launch with

2nd Method

<a href="instagram://user?username={USERNAME}">Link to Instagram Profile</a>

  • If user installed instagram application : Directly launch page with native application
  • If user not installed instagram application : Do nothing

Tested on Android 4.4 Chrome

like image 159
Chemical Programmer Avatar answered Oct 19 '22 21:10

Chemical Programmer


For browsers in android, if you want to link to a specific instagram page, try this:

<a href="http://instagram.com/_u/USERNAME/">visit our instagram page</a>
like image 32
Koushan Avatar answered Oct 19 '22 19:10

Koushan


You have a typo the href should be :// not //:

<div>
<a href="instagram://media?id=434784289393782000_15903882">instagram://media?id=434784289393782000_15903882</a>

like image 6
krisrak Avatar answered Oct 19 '22 21:10

krisrak