How to make Instagram a button "Open in the application"?

I am making an application in angular 1.4.2 and want to simulate the behavior of a mobile instagram website to open the application when I click the instagram open button, maybe?

enter image description here

I already tried the solutions on old posts, but none of them worked. I don't know if this is an angular problem or that they no longer work. Old posts:

More on what I tried and didn't work:

<a href="instagram://media?id=434784289393782000_15903882">instagram://media?id=434784289393782000_15903882</a>
<a href="http://instagram.com/_u/{USERNAME}/">Link to Instagram Page</a>
<a href="instagram://user?username={USERNAME}">Link to Instagram Profile</a>
<a href="intent://instagram.com/_n/mainfeed/#Intent;package=com.instagram.android;scheme=https;end"> test open Instagram ANDROID</a>
<a href="http://instagram.com/_u/USERNAME/">visit our instagram page</a>
<a href="instagram://user?username=untitled.tiff">untitled.tiff</a>
<a href="instagram://app">Open Instagram</a>
+4
source share
1 answer

I tried to continue and this link ended up working.

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

, "unsafe:", angular.

var app = angular.module( 'myApp', [] )
.config( [
    '$compileProvider',
    function( $compileProvider )
    {   
     $compileProvider.aHrefSanitizationWhitelist(/^\s*(http|https?|local|data|instagram):/);
    }
]);
+2

Source: https://habr.com/ru/post/1669848/


All Articles