Android deep link into Instagram app

送分小仙女□ 提交于 2021-02-07 07:18:39

问题


Instagram has published url schemes for iOS deep linking, but they haven't created documentation for Android.

Is there a way to deep link into the instagram app on Android to go to particular places in the Instagram app, such as specific posts in Instagram

From a technical perspective, this should have been included in Instagram's Android app and documentation many years ago, but I am not aware of it

There may be some hack way to achieve the same result that people have figured out, so any insight is appreciated.

My instagram app does not have comment access granted from Instagram, and has been denied this particular functionality so sending a comment via API is not an option and I would prefer the user opened the instagram app.


回答1:


Instagram has registered urls on Android. When you try opening an instagram link it will prompt the user and ask them what app they want to use to handle the url. Choices will probably include various browsers, and the instagram app. When the user selects "always" and picks instagram to handle the url, it will use instagram as the default handler for instagram.com urls from then on.

Basically, you don't need to worry about it. It just works.




回答2:


With bellow link you can access to Instagram directly in android:

intent://instagram.com/_u/ebadgh/#Intent;package=com.instagram.android;scheme=https;end

You must replace ebadgh with your username




回答3:


You can directly open app with specific user name:

instagram://user?username=$instagramPageName




回答4:


It seems you want to link to a specific photo on a specific user's Instagram feed.

Using the media endpoints, use getString("link") when parsing the jsonArray at the index for the jsonObject containing the "image" and "comment".



来源:https://stackoverflow.com/questions/29479656/android-deep-link-into-instagram-app

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!