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); } }); });`
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 Travis Bell
on верасень 11, 2013 at 5:57 PM
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.
Reply by Ning23
on верасень 12, 2013 at 1:24 PM
Thanx now I feel an idiot!! Query example also big help