Social

Facebook Social Plugins

스크립트 혹은 iframe 으로 간단하게 페이스북과 내 사이트를 연동하는 방법을 설명하고 예제를 확인합니다.

Like button

<div class="fb-like" data-href="http://opentutorials.org" data-send="true" data-width="450" data-show-faces="true"></div>

 

Namespace

xmlns:fb="http://www.facebook.com/2008/fbml"

 

Metadata

  • <meta property="[type]" content="[content]" />
  • og:title
  • og:type
  • og:url
  • og:image
  • og:site_name
  • fb:admins
  • og:description

 

Code snippet

<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:og="http://ogp.me/ns#"
      xmlns:fb="http://www.facebook.com/2008/fbml">
  <head>
    <title>The Rock (1996)</title>
    <meta property="og:title" content="The Rock"/>
    <meta property="og:type" content="movie"/>
    <meta property="og:url" content="http://www.imdb.com/title/tt0117500/"/>
    <meta property="og:image" content="http://ia.media-imdb.com/rock.jpg"/>
    <meta property="og:site_name" content="IMDb"/>
    <meta property="fb:admins" content="USER_ID"/>
    <meta property="og:description"
          content="A group of U.S. Marines, under command of
                   a renegade general, take over Alcatraz and
                   threaten San Francisco Bay with biological
                   weapons."/>
    ...
  </head>
  ...
</html>

 

External Links

댓글

댓글 본문
작성자
비밀번호
버전 관리
고빈섭
현재 버전
선택 버전
graphittie 자세히 보기