如何在Instagram中获取用户的照片?

在应用程序中我的要求是获取用户的照片然后显示在我的程序中。
我进行了身份验证,获的访问权限,输入用户名和密码,但是还是显示不允许我打开这个页面。请问我如何获得用户的配置文件和照片呢?
关于这个问题,我使用的以下代码:

String url ="https://instagram.com/oauth/authorize?" +"response_type=token" + 
 "&redirect_uri=" + CALLBACK_URL+"&scope=basic"+"&client_id=" + CLIENT_ID ;

  WebView webview = (WebView)findViewById(R.id.webview);

  webview.setWebViewClient(new WebViewClient() {

        public void onPageStarted(WebView view, String url, Bitmap favicon) {
            String fragment = "#access_token=";
            int start = url.indexOf(fragment);
            if (start > -1) {

                // You can use the accessToken for api calls now.
                String accessToken = url.substring(start + fragment.length(), url.length());

                Log.v(TAG, "OAuth complete, token: [" + accessToken + "].");
                Log.i(TAG, "" +accessToken);
Toast.makeText(ActivityWebView.this, "Token: " + accessToken, Toast.LENGTH_SHORT).show();
            }
        }
    });

    webview.loadUrl(url);
}

我是用以下代码解决的:

 URL example = new URL("https://api.instagram.com/v1/users/self/media/recent?access_token="
                            + accessToken);

            URLConnection tc = example.openConnection();
            BufferedReader in = new BufferedReader(new InputStreamReader(
                    tc.getInputStream()));

            String line;
            while ((line = in.readLine()) != null) {
                JSONObject ob = new JSONObject(line);

                JSONArray object = ob.getJSONArray("data");

                for (int i = 0; i < object.length(); i++) {


                    JSONObject jo = (JSONObject) object.get(i);
                    JSONObject nja = (JSONObject) jo.getJSONObject(photos);

                    JSONObject purl3 = (JSONObject) nja
                            .getJSONObject("thumbnail");
                    PhotoSet set = new PhotoSet();
                    set.setThumb(purl3.getString("url"));
                    thesets.add(set);

                    Log.i(TAG, "" + purl3.getString("url"));
                }

            }
        } catch (MalformedURLException e) {

            e.printStackTrace();
        } catch (IOException e) {

            e.printStackTrace();
        } catch (JSONException e) {

            e.printStackTrace();
        }

    }

获取/users/[USER_ID]/media/recent/?access_token=[ACCESS_TOKEN]
你可以打这个URL获取用户的需求(最后20张照片),这将会给你一个JSON数组,你需要解析完后,然后根据需要显示在你的应用程序中。