如何制作 Instagram "Open in app" 按钮?
How to make Instagram "Open in app" button?
我正在 angular 1.4.2 中开发一个应用程序,我想模仿 instagram 移动网络的行为来打开应用程序,当我点击按钮时,instagram 会打开,这可能吗?
我已经在旧帖子上尝试过这些解决方案,但 none 似乎有效。我不知道这是 angular 问题还是它们不再起作用了。
较旧的帖子:
- Open Instagram from Android Browser
- Link on a webpage to open instagram app
我尝试过但没有成功的更多细节:
<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>
我进一步尝试 link 最终成功了。
<a href="instagram://user?username={USERNAME}">Link to Instagram Profile</a>
我还必须添加以删除 angular 添加的 "unsafe:" 标签。
var app = angular.module( 'myApp', [] )
.config( [
'$compileProvider',
function( $compileProvider )
{
$compileProvider.aHrefSanitizationWhitelist(/^\s*(http|https?|local|data|instagram):/);
}
]);
我正在 angular 1.4.2 中开发一个应用程序,我想模仿 instagram 移动网络的行为来打开应用程序,当我点击按钮时,instagram 会打开,这可能吗?
我已经在旧帖子上尝试过这些解决方案,但 none 似乎有效。我不知道这是 angular 问题还是它们不再起作用了。 较旧的帖子:
- Open Instagram from Android Browser
- Link on a webpage to open instagram app
我尝试过但没有成功的更多细节:
<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>
我进一步尝试 link 最终成功了。
<a href="instagram://user?username={USERNAME}">Link to Instagram Profile</a>
我还必须添加以删除 angular 添加的 "unsafe:" 标签。
var app = angular.module( 'myApp', [] )
.config( [
'$compileProvider',
function( $compileProvider )
{
$compileProvider.aHrefSanitizationWhitelist(/^\s*(http|https?|local|data|instagram):/);
}
]);