We are about to switch to a new forum software. Until then we have removed the registration on this forum.
I have a problem to get tags in array, while the getJSONArray for the images work fine. Processing errors say that jsonarray does not match with String[] variable that i declared. Here is my code.
JSONObject tags; String urlt[]; String tag;
JSONObject photos;
String url; String url1;
void setup() {
size(612,612); tags = loadJSONObject("https://api.instagram.com/v1/tags/art/media /recent?access_token=###&count=2");
photos = loadJSONObject("https://api.instagram.com/v1/tags/art/media/recent?access_token=###&count=2");
urlt = tags.getJSONArray("data").getJSONObject(0).getJSONArray("tags");
url = photos.getJSONArray("data").getJSONObject(0).getJSONObject("images").getJSONObject("standard_resolution").getString("url"); }
this is the json
data": [ { "attribution": null, "tags": [ "sketchbook", "art", "artist", "wildstyle", "sketching", "blackbook", "graffitiporn", "graffiti", "artwork", "graffitiart", "drawing" ], "type": "image", "location": null, "comments": {}, "filter": "Normal", "created_time": "1454153337", "link": "https://www.instagram.com/p/BBKVniUS6RQ/", "likes": {}, "images": { "low_resolution": { "url": "https://scontent.cdninstagram.com/t51.2885-15/s320x320/e35/12552346_113389542379086_541490762_n.jpg", "width": 320, "height": 320 }