The Movie Database-støtte

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);
            }
    });
});`

2 svar (på side 1 av 1)

Jump to last post

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.

Thanx now I feel an idiot!! Query example also big help

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

Global

s focus the search bar
p åpne profilmenyen
esc lukk et åpent vindu
? open keyboard shortcut window

On media pages

b gå tilbake (eller til foreldresiden når mulig)
e go to edit page

On TV season pages

(right arrow) go to next season
(left arrow) go to previous season

On TV episode pages

(right arrow) go to next episode
(left arrow) go to previous episode

On all image pages

a open add image window

On all edit pages

t open translation selector
ctrl+ s submit form

On discussion pages

n create new discussion
w toggle watching status
p toggle public/private
c toggle close/open
a open activity
r reply to discussion
l go to last reply
ctrl+ enter submit your message
(right arrow) next page
(left arrow) previous page

Innstillinger

Vil du vurdere eller legge til dette elementet i en liste?

Logg inn