简体   繁体   English

从 iOS 上的链接打开 Instagram 应用

[英]Opening Instagram app from a link on iOS

I am providing a feed which is consumed by both desktop and mobile apps which contains links to images, users, and tags on Instagram.我提供了一个供桌面和移动应用程序使用的提要,其中包含指向 Instagram 上的图像、用户和标签的链接。 When these links are clicked on iOS, I want them to open in the Instagram app.当在 iOS 上点击这些链接时,我希望它们在 Instagram 应用程序中打开。

Currently if I have a link like this: https://www.instagram.com/p/BK8f1rigadE/目前,如果我有这样的链接: https : //www.instagram.com/p/BK8f1rigadE/

If I click it in iOS, the Instagram app does open , just briefly.如果我在 iOS 中点击它,Instagram 应用程序会打开,只是简单地打开 It then seems to launch Safari to the page, which includes an "open in app" link to open it back up in the app.然后它似乎将 Safari 启动到该页面,其中包含一个“在应用程序中打开”链接以在应用程序中将其打开。 That link uses the " instagram:// " protocol to trigger the app to open.该链接使用“ instagram:// ”协议来触发应用程序打开。 I'm aware of that method, but that's not what I'm after.我知道这种方法,但这不是我所追求的。

I'm on iOS 10 with the latest Instagram app.我在 iOS 10 上使用最新的 Instagram 应用程序。 I feel like this used to work, so I'm wondering if it's just a bug in iOS or Instagram that will be fixed eventually.我觉得这曾经有效,所以我想知道它是否只是 iOS 或 Instagram 中的一个错误,最终会被修复。

Links to twitter.com open properly in the Twitter app... that's the kind of behavior I'm after. twitter.com 的链接在 Twitter 应用程序中正确打开......这就是我所追求的那种行为。

I found a service called URL Genius (via this blog post ) that solves this exact problem, and provides click metrics, too.我找到了一个名为URL Genius的服务(通过这篇博文),它解决了这个确切的问题,并提供了点击指标。

I don't like relying on an external service for such an important link, but it's easy, works well, and the basic service is free.这么重要的环节我不喜欢依赖外部服务,但是很简单,效果很好,而且基本服务是免费的。 I will probably set a reminder for myself to check that this still works every month or so...我可能会为自己设置一个提醒来检查这是否每个月左右仍然有效......

Links like this work to open the app: instagram://media?id=1346423547953773636_401375631像这样的链接可以打开应用程序: instagram://media?id=1346423547953773636_401375631

However I want a regular http link, which opens a browser on desktop, and the app on mobile.但是我想要一个常规的 http 链接,它可以在桌面上打开浏览器,在移动设备上打开应用程序。 Not sure if it exists.不确定它是否存在。

From my knowledge, the only supported links into Instagram are described here据我所知, 这里描述了唯一受支持的 Instagram 链接

I'm not sure what the link you're attempting to use represents: /p/id_here seems like a post?我不确定您尝试使用的链接代表什么: /p/id_here似乎是一个帖子? You likely need to use:您可能需要使用:

https://www.instagram.com/media?id=id_here

The documentation I linked shows the "deeplink" approach ( instagram:// ) which I understand you're avoiding, but the same paths should work through the Universal Link approach, at least from my experience.我链接的文档显示了“深层链接”方法( instagram:// ),我知道您正在避免这种方法,但至少从我的经验来看,相同的路径应该通过Universal Link方法起作用。

Had the same problem.有同样的问题。 For me was solved by simply uninstalling and reinstalling the problematic app.对我来说,只需卸载并重新安装有问题的应用程序即可解决。

(Instagram 171.0 - iOS 14.3 - iPhone 11 Pro) (Instagram 171.0 - iOS 14.3 - iPhone 11 Pro)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM