Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/207.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何从Android应用程序直接关注Instagram?_Android_Instagram - Fatal编程技术网

如何从Android应用程序直接关注Instagram?

如何从Android应用程序直接关注Instagram?,android,instagram,Android,Instagram,我想在我的android应用程序中添加一个按钮,允许我的应用程序用户直接从我的应用程序在Instagram上关注我。我该怎么做?目前,我有以下代码,允许我的应用程序用户打开我的Instagram配置文件: Uri uri = Uri.parse("http://instagram.com/_u/" + R.string.instagram_id); Intent likeIng = new Intent(Intent.ACTION_VIEW, uri); likeIng

我想在我的android应用程序中添加一个按钮,允许我的应用程序用户直接从我的应用程序在Instagram上关注我。我该怎么做?目前,我有以下代码,允许我的应用程序用户打开我的Instagram配置文件:

    Uri uri = Uri.parse("http://instagram.com/_u/" + R.string.instagram_id);
    Intent likeIng = new Intent(Intent.ACTION_VIEW, uri);

    likeIng.setPackage("com.instagram.android");

    try {
        startActivity(likeIng);
    } catch (ActivityNotFoundException e) {
        startActivity(new Intent(Intent.ACTION_VIEW,
                Uri.parse("http://instagram.com/" + R.string.instagram_id)));
    }

尝试查找Instagram为您选择跟踪用户时生成的超链接,并将其集成到您的代码中?或者你也可以使用类似Firefox的篡改数据来查看通过浏览器进行的交易,看看是否可以模拟这些交易。哦,也可以尝试使用Instagram API。在那里你可能会更幸运。www.instagram.com/developer/