I'm doing an app in angular 1.4.2 and want to mimic the behaviour of instagram mobile web to open the app, when I tap on the button the instagram is opened, is that possible?
I already tried the solutions on older posts but none seemed to work. I don't know if it's an angular problem or that they don't work anymore. Older posts:
More details of what I tried and didn't worked:
<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>
I tried further and this link end up working.
<a href="instagram://user?username={USERNAME}">Link to Instagram Profile</a>
Also I had to add to remove the "unsafe:" tag that angular was adding.
var app = angular.module( 'myApp', [] )
.config( [
'$compileProvider',
function( $compileProvider )
{
$compileProvider.aHrefSanitizationWhitelist(/^\s*(http|https?|local|data|instagram):/);
}
]);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With