适用于Android的Instagram自定义URL方案 [英] Instagram custom URL scheme for Android

查看:430
本文介绍了适用于Android的Instagram自定义URL方案的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要使用HTML链接运行Instagram应用程序. 对于iPhone,我使用iPhone挂钩(Instagram iPhone挂钩).

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?

推荐答案

有一个

There's a thread on this subject in the Instagram API Developers group on Google Groups.

据Instagram开发人员之一Mike Krieger所述,您已经可以使用Intents在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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆