When I try to get comments on multimedia, it returns to me only the comments of users who own access tokens and no other user comments.
Request:
https://api.instagram.com/v1/media/"+mediaId+"/comments?access_token="+token
So the final request looks like this:
https:
Answer:
`{"meta":{"code":200},"data":[{"created_time":"1453069290","text":"comment_text_here","from":{"username":"username","profile_picture":"profile_picture","id":"user_id","full_name":"full_name"},"id":"1164752089812694405"}]}'
Get media ID:
https://api.instagram.com/v1/users/self/media/recent/?access_token="+token+"&count=30
Retrieving a list of media identifiers
JSONObject json = new JSONObject(comments);
JSONArray data = json.getJSONArray("data");
if (data.length()>0) {
for (int i = 0; i < data.length(); i++) {
JSONObject obj = (JSONObject) data.get(i);
list.add(obj.getString("id"));
}
}
Where is my mistake or is it the instagram api limits for the sandbox app?
source
share