The Movie Database Support

Hey, I'm new to using this API but I'm trying to get the value poster_sizes into my posterpath without having to hard code it in. I tried doing

for (int i = 0; i < 7; i++) {  
            posterSize[i] = jsonObject.getString("poster_sizes");  
            Log.i(TAG, i + "size: " + posterSize[i]);  
        } 

and

posterSize = jsonObject.getString("poster_sizes");  

but i keep getting a json exception: No value for poster_sizes.

2 replies (on page 1 of 1)

• Jump to last post

Maybe here you will find what you need
https://developers.themoviedb.org/3/configuration/get-api-configuration

Or with this Request
https://api.themoviedb.org/3/configuration?api_key=[MY_KEY]

    "poster_sizes": [
      "w92",
      "w154",
      "w185",
      "w342",
      "w500",
      "w780",
      "original"
    ],

I changed it to JSONArray images = jsonObject.getJSONArray("poster_sizes"); and then I assume I have to input the contents of that array into a string array? Either way, that line of code still gives me the same error. And i dont know why.

Can't find a movie or TV show? Login to create it.

Want to rate or add this item to a list?

Login