본문 바로가기

Story/html/css

Facebook like button FBML META Tags

반응형

FBML META Tags
Just include following META tags, you can specify Title, Image, Description and etc.

<html xmlns="http://www.w3.org/1999/xhtml" xmlns:og="http://ogp.me/ns#" xmlns:fb="https://www.facebook.com/2008/fbml">
<head>
<title>Product Name</title>
<meta property="og:title" content="Product Name"/>
<meta property="og:type" content="Shopping"/>
<meta property="og:url" content="http://www.website.com/product/75"/>
<meta property="og:image" content="http://www.website.com/product.jpg"/>
<meta property="og:site_name" content="WEBSITE"/>
<meta property="og:description" content="Product Description "/>
....
</head>
<body>
<h1>Product Name</h1>

<iframe scrolling="no" frameborder="0" allowtransparency="allowTransparency" width="280" height="65" src="http://www.facebook.com/widgets/like.php?width=280&show_faces=1&layout=standard&href=http://www.website.com/product/75"></iframe>
or

<iframe allowTransparency='true' frameborder='0' scrolling='no' src='http://www.facebook.com/plugins/like.php?href=http://www.website.com/product/75&send=false&layout=button_count&width=85&show_faces=false&action=like&colorscheme=light&height=21'></iframe> 


</body>
</html>

 

출처 : http://www.9lessons.info/2012/11/facebook-like-button.html

참고 : http://developers.facebook.com/docs/opengraphprotocol/#types

validation : https://developers.facebook.com/tools/debug/og/echo?q=YOUR_WEBSITE_URL_HERE

반응형