The Movie Database 지원

I am working on developing a webapplication , where I need to use the TMDB ... for displaying the movie details and posters.

I have added the posters as a Hyperlink in the website... which on click should take me to the movie page.

https://www.tmb.org/movie${movie.id} - this is the url path i gave in my js application, but it's taking me nowhere.

14 댓글 (1 / 1)

Jump to last post

First, you need a slash between the word movie and the Id.

Secondly, the URL of our site is https://www.themoviedb.org , not https://www.tmb.org .

@superboy97 -

{https://www.themoviedb.org/movie${movie.id}} - this is the edited URL, even this is not working.

@rna_j_rohan said:

@superboy97 -

{https://www.themoviedb.org/movie${movie.id}} - this is the edited URL, even this is not working.

It seems that you didn't read my answer completely. Especially, the first line.

@superboy97 . I have read it.... isn't the ${movie.id} contains a slash in it already?..

I am following a course,.. there they mentioned that it contains the slash already

If you put one in it, it will be there. But, if you just put the Id in it, it will not be there.

@superboy97 .. that's giving empty page.

What is your id value ? and what is the exact complete URL you have generated ?

like it ain't via API.. what I am trying to do is

I am trying to display popular movies list in the website.

and I have used state variables - movie.original_title - for the name || movie.release_date - for the release date... similarly

I need to be able to go to that particular movie page... where the details about the movie are there.. via react application.

I need the answer to my questions. Without that, I can't help you.

id value - it has to fetch from the ${movie.id} variable and render it.

"https://api.themoviedb.org/3/movie/popular?api_key=THE_KEY" - this is the API call used for fetch method.

This has nothing to do with my questions.

I want to know:

  • the content of your ${movie.id} variable at the time you display the URL
  • the exact and complete URL you display on your page (once the replacements have been done) and that give an empty page when clicked.

@rna_j_rohan said:
id value - it has to fetch from the ${movie.id} variable and render it.
"https://api.themoviedb.org/3/movie/popular?api_key=THE_KEY" -
this is the API call used for fetch method.

I got the first ID from the response of this API Request.
https://api.themoviedb.org/3/movie/popular?api_key=THE_KEY
I used this ID 533535 in this example.

https://www.themoviedb.org/movie${movie.id}  

I added the forward slash, "/"
https://www.themoviedb.org/movie/533535
I accessed the WEB page without any problems.

I will replace your API Key with THE_KEY expression.
It is not good to show your Key to all forum users.

@rna_j_rohan, as @superboy97 and @ticao2 have said, you need to add a slash.

Compare these two strings, the first is what you are doing (wrong), and the second is what you need to do (correct):

https://www.themoviedb.org/movie${movie.id}

Vs.

https://www.themoviedb.org/movie/${movie.id}

찾으시는 영화나 TV 프로그램이 없나요? 로그인 하셔서 직접 만들어주세요.

전체

s 검색 바 띄우기
p 프로필 메뉴 열기
esc 열린 창 닫기
? 키보드 단축키 창 열기

미디어 페이지

b 돌아가기
e 편집 페이지로 이동

TV 시즌 페이지

(우 화살표) 다음 시즌으로 가기
(좌 화살표) 이전 시즌으로 가기

TV 에피소드 페이지

(우 화살표) 다음 에피소드로 가기
(좌 화살표) 이전 에피소드로 가기

모든 이미지 페이지

a 이미지 추가 창 열기

모든 편집 페이지

t 번역 선택 열기
ctrl+ s 항목 저장

토론 페이지

n 새 토론 만들기
w 보기 상태
p 공개/비공개 전환
c 열기/닫기 전환
a 활동 열기
r 댓글에 글쓰기
l 마지막 댓글로 가기
ctrl+ enter 회원님의 메세지 제출
(우 화살표) 다음 페이지
(좌 화살표) 이전 페이지

설정

이 항목을 평가하거나 목록에 추가할까요?

로그인