Hi
I'm trying to work out how to get jQuery JSON response back when you know the person or film id
I was expecting something like the example http://docs.themoviedb.apiary.io/#people
I found a search example for movie name that i'm using as a base but with the following I get an error
status_code 7
status_message "Invalid API key - You must be granted a valid key"
my key is working so i'm missing some thing
I'm also unsure what the "jsonpCallback: 'testing'," is for, in a live query should "Testing" be "live"?
Thanx
`// JavaScript Document $(document).ready(function() { var url = 'http://api.themoviedb.org/3/person/287', key = '&api_key=PastedWorkingKey'; $.ajax({ type: 'GET', url: url + key, async: false, jsonpCallback: 'testing', contentType: 'application/json', dataType: 'jsonp', success: function(json) { console.dir(json); }, error: function(e) { console.log(e.message); } }); });`
No trobeu una pel·lícula o una sèrie? Inicieu la sessió per a crear-la.
Desitgeu valorar o afegir aquest element a una llista?
No en sou membre?
Resposta per Travis Bell
el 11 n de 2013 a les 5:57 P.M.
I believe it's because you're not formatting your HTTP params properly. Try changing your
key
var to?api_key=PastedWorkingKey
.There's an example script I put up here (not your exact use case, but a working jQuery example): http://dev.travisbell.com/play/tmdb.html
Just be sure to change line 11.
Resposta per Ning23
el 12 n de 2013 a les 1:24 P.M.
Thanx now I feel an idiot!! Query example also big help