适用于 Android 的 Instagram 自定义 URL 方案 [英] Instagram custom URL scheme for Android
问题描述
我需要使用 HTML 链接运行 Instagram 应用程序.对于 iPhone,我使用 iPhone Hooks(Instagram iPhone Hooks一>).
I need to run the Instagram Application, using the HTML link. For iPhone I use iPhone Hooks(Instagram iPhone Hooks).
我如何为 Android 做同样的事情?
How can I do the same for Android?
推荐答案
有一个 讨论此主题.
据 Instagram 开发者之一 Mike Krieger 所说,您已经可以使用 Intent 在 Android 上实现文档交互.如果这就是您所需要的,您应该查看 与意图共享.
According to Mike Krieger, who is one of the Instagram developers, you can already achieve Document Interaction on Android using Intents. If that is what you need, you should look at the Android document on sharing with intents.
共享图片的基本代码(应该弹出 Instagram 作为您的共享选项之一)如下所示:
The basic code for sharing an image (which should popup Instagram as one of your sharing options) would look like this:
Intent intent = new Intent(Intent.ACTION_SEND);
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET);
intent.setType("image/*");
Uri uri = Uri.fromFile(getFileStreamPath(pathToImage));
intent.putExtra(Intent.EXTRA_STREAM, uri);
startActivity(Intent.createChooser(intent, "How do you want to share?"));
pathToImage
显然是您要共享的图像的文件名.
pathToImage
is obviously the filename of the image you want to share.
遗憾的是,目前似乎不支持任何自定义 URL 功能.因此,如果这就是您所追求的,我建议您在 Google 网上论坛帖子中提供反馈,具体说明您需要哪些功能.
Unfortunately there doesn't appear to be support for any of the custom URL functionality at this point. So if that is what you're after, I would suggest you provide feedback in that Google Groups thread saying specifically which functionality you need.
这篇关于适用于 Android 的 Instagram 自定义 URL 方案的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!