简体   繁体   中英

should i get a new access token for every user instagram

I'm going to write an app that have more than 50 request for every user.should i get the access token for every user that Authenticated? and how to do it with java?i get the APIs with but how to get the access token?

class GetRequestAsyncTask extends AsyncTask<String, String, String> {
        @Override
        protected String doInBackground(String... uri) {
            DefaultHttpClient http_client = new DefaultHttpClient();
            HttpResponse response;
            String respondString;
            try {
                response = http_client.execute(new HttpGet(uri[0]));
                StatusLine statusLine = response.getStatusLine();
                if (statusLine.getStatusCode() == HttpStatus.SC_OK) {
                    ByteArrayOutputStream out = new ByteArrayOutputStream();
                    response.getEntity().writeTo(out);
                    respondString = out.toString();

                    out.close();
                    Log.w("FLAG!", "Data downloaded:"+respondString);
                    return respondString;
                } else {
                    response.getEntity().getContent().close();
                    throw new IOException(statusLine.getReasonPhrase());
                }
            } catch (ClientProtocolException e) {
                Log.e("ClientProtocolException GetTask", e.toString());
                return "";
            } catch (IOException e) {
                Log.e("IOException GetTask", e.toString());
                return "";
            }
        } 

Who are the users of this?

If you ask your users to log into their Instagram account, and authorize your app, then you can make 5000 requests per hour per user:

http://instagram.com/developer/limits/

If you just use your key, you are limited to 5000 requests per hour, no matter how many users you have.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM