4
當我試圖讓媒體發表評論時,它僅返回我訪問令牌擁有者用戶的評論,並且沒有其他用戶評論。獲取評論由instagram api
查詢:
https://api.instagram.com/v1/media/"+mediaId+"/comments?access_token="+token
所以最終的查詢是這樣的:
https://api.instagram.com/v1/media/1162251688307718037_1824437940/comments?access_token=token
答:
`{"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"}]}'
獲取媒體ID:
https://api.instagram.com/v1/users/self/media/recent/?access_token="+token+"&count=30
獲取媒體ID列表
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"));
//System.out.println(obj.getString("id"));
}
}
在哪裏我的錯誤或沙盒應用程序是Instagram的API限制?
拿給我要其他網友的評論,以及如果它不是在沙盒模式 – NetStarter