【问题标题】:How to download instagram private post in android如何在android中下载instagram私人帖子
【发布时间】:2022-12-24 23:30:20
【问题描述】:

我正在创建一个 Instagram 帖子下载器 android 应用程序。如何通过在 android 中复制共享 URL 从 Instagram 下载私人图片和视频。我使用下面的代码。请帮我看看这段代码中缺少什么。

 if (stringData.matches("https://www.instagram.com/(.*)")) {
            String[] data = stringData.split(Pattern.quote("?"));
            String string = data[0];
            Log.i("TAG", "data: string "+string);
            if (isNetworkAvailable()) {
                Log.i("TAG", "data: isNetworkAvailable IF "+isNetworkAvailable());

                if (Method.isDownload) {

                    Log.i("TAG", "data: Method.isDownload IF "+Method.isDownload);

                    AsyncHttpClient client = new AsyncHttpClient();
                    client.get(string + "?__a=1", null, new AsyncHttpResponseHandler() {
                        @Override
                        public void onSuccess(int statusCode, Header[] headers, byte[] responseBody) {

                        }

                        @Override
                        public void onFailure(int statusCode, Header[] headers, byte[] responseBody, Throwable error) {
                            //Some thing went to wrong
                        }
                    });
                } else {
                    //First of all one download complete then after you can another download
                }
            } else {
              //No Internet Connection
            }
        } else {
            //No supported
        }

【问题讨论】:

    标签: android download instagram instagram-graph-api instagram-story


    【解决方案1】:

    这段代码没有问题,您可以从公共资料下载。但是,一旦您从私人帐户访问数据,就会出现错误。您必须从 Instagram 提供登录密码才能获取私人数据。

    【讨论】:

      猜你喜欢
      • 2016-05-14
      • 2019-11-28
      • 2020-11-19
      • 2021-07-12
      • 1970-01-01
      • 1970-01-01
      • 2013-01-05
      • 2018-08-12
      • 2018-06-12
      相关资源
      最近更新 更多