I'm trying to get data from page 2 and so on, but I keep getting page 1 data in my app. If I place the url link in chrome the response is correct, but in the app it reverts back to page 1. This is how the call looks like:
https://api.themoviedb.org/3/movie/popular?api_key=###&include_adult=false&page=29&watch_region=NL&vote_average.ite=1
Can't find a movie or TV show? Login to create it.
Want to rate or add this item to a list?
Not a member?
Reply by robbie3999
on July 20, 2023 at 10:21 AM
Hi @Majinnn, you have several problems.
First, you need to edit your post immediately and replace the api_key value with something like THE_KEY or xxxxx. Never share your api_key in public.
Second, that query doesn't support most of the parameters you are passing it. See the documentation here.
Perhaps you meant to use the discover query. Even in that query there is no vote_average.ite. You would want vote_average.lte/gte.
Lastly, a general troubleshooting tip, if you get different results in your browser and in your app, try putting a print statement in your app where you retrieve the url to make sure it is what you think it is.
Reply by Majinnn
on July 21, 2023 at 6:21 AM
Even after changing all what you said, I still only get results from page 1.
I have prints everywhere, that's why I know that the response keeps giving me page 1 results.
Reply by ticao2 š§š· pt-BR
on July 21, 2023 at 7:49 AM
I'm not a code programmer. Just a curious old man.
I will highlight in the title the tool you are using.
I believe that your chances of getting help from other users here on the forum will increase a lot.
Something like
Swift UI iOS - Results past page 1
Reply by robbie3999
on July 21, 2023 at 1:17 PM
@Majinnn, to be clear I was suggesting you print out the url you are sending, not the results you get back. It seems likely that you are sending a malformed url where the page number is undefined for whatever reason. Note that in the query the page number is -optional-, and if it can't determine a page number the default is page 1.
Reply by Majinnn
on July 23, 2023 at 8:52 AM
I also have a print for the url. The print show's that the url is sent correctly, but for some reason it reverts back to page 1