오픈 그래프
2022. 9. 17. 10:21ㆍ프로그래밍/HTML & CSS
- 목차
오픈 그래프 (The Open Graph protocol)
웹페이지가 소셜 미디어(카카오톡, 페이스북 등)로 공유될 때 우선적으로 활용되는 정보를 지정할 수 있다.
<meta property="og:type" content="website" />
<meta property="og:site_name" content="사이트이름" />
<meta property="og:title" content="페이지이름" />
<meta property="og:description" content="페이지설명" />
<meta property="og:image" content="이미지주소" />
<meta property="og:url" content="페이지주소" />
...
- og:type: 페이지의 유형(E.g, website, video.movie)
- og:site_name: 속한 사이트의 이름
- og:title: 페이지의 이름(제목)
- og:description: 페이지의 간단한 설명
- og:image: 페이지의 대표 이미지 주소(URL)
- og:url: 페이지 주소(URL)
참고: https://ogp.me/
Open Graph protocol
The Open Graph protocol enables any web page to become a rich object in a social graph.
ogp.me
트위터 카드 (Twitter Cards)
웹페이지가 트위터로 공유될 때 우선적으로 활용되는 정보를 지정할 수 있다.
<meta property="twitter:card" content="summary" />
<meta property="twitter:site" content="사이트이름" />
<meta property="twitter:title" content="페이지이름" />
<meta property="twitter:description" content="페이지설명" />
<meta property="twitter:image" content="이미지주소" />
<meta property="twitter:url" content="페이지주소" />
...
- twitter:card: 페이지(카드)의 유형(E.g. summary, player)
- twitter:site: 속한 사이트의 이름
- twitter:title: 페이지의 이름(제목)
- twitter:description: 페이지의 간단한 설명
- twitter:image: 페이지의 대표 이미지 주소(URL)
- twitter:url: 페이지 주소(URL)