Hello, i have a problem how to make to apear Top Billed Cast all with his photo, json is working but credits and variables it is the same on every character.
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 9 novembre 2016 à 11h07
Hi @seedfile
If you query the /movie/credits all you need to do is iterate over the
cast
array. Each item contains the person, character name and profile image for the movie.Here's some quick Ruby code showing you the first 4 credits from Fight Club (just as an example):
Réponse de seedfile
le 9 novembre 2016 à 11h36
I have writed this code....
and didn't working...
Réponse de Travis Bell
le 9 novembre 2016 à 11h47
Take a look at the response you're getting back, there is no key called
credits_id
in the root of the JSON object. You need to first access thecast
array, then iterate over each item like I did above .Réponse de seedfile
le 9 novembre 2016 à 12h47
echo $movcredits["cast"][0];
dind't work, have you another php solution like my?
Réponse de Travis Bell
le 9 novembre 2016 à 12h55
I don't know PHP, so I can't be very helpful with that. There's 2 things I suggest at this point:
Cheers.