I am just making a basic ajax call to 'http://api.themoviedb.org/3/genre/movie/list&api_key=#####' I keep getting a 'Cannot get' error? what am I doing wrong?
Un film, une émission télévisée ou un artiste est introuvable ? Connectez-vous afin de créer une nouvelle fiche.
Vous souhaitez évaluer ou ajouter cet élément à une liste ?
Pas encore membre ?
Réponse de Travis Bell
le 13 août 2016 à 11h38
Hi Luke,
I'm not sure. Everything looks fine to me. How are you making the request?
Réponse de luke_simmon
le 13 août 2016 à 14h14
Here it is:
Réponse de Travis Bell
le 14 août 2016 à 11h15
Even though you have your dataType set to jsonp, is is sending along a callback?
This test of mine here is working fine (make sure to replace your API key on line 11).
Réponse de luke_simmon
le 14 août 2016 à 11h47
I am using the api in many other instances, genre has been the only on genre. I see that you added a query at the end, is that necessary? I am trying to get the list of genres to use for the movies gennre codes that I get.
Réponse de Travis Bell
le 14 août 2016 à 13h55
No, it is not necessary. It was accidentally left from a previous example.
Réponse de luke_simmon
le 14 août 2016 à 18h53
Cannot GET https://api.themoviedb.org/3/genre/movie/list&api_key=####?callback=jQuery22408132628371243029_1471207855881&_=1471207855884
Réponse de Travis Bell
le 15 août 2016 à 00h22
That's not a valid HTTP request. You're looking for:
Réponse de luke_simmon
le 15 août 2016 à 16h08
forgive me. I am not seeing a difference between your request and my request
Réponse de Travis Bell
le 15 août 2016 à 19h26
You're starting your query string with an ampersand. That's not valid HTTP, so it's ignoring your API key param and only reading from the question mark and on. In my example, I fixed that for you.
Réponse de luke_simmon
le 16 août 2016 à 13h39
thanks for your help. that fixed it