2013年7月15日 星期一

[FB social plugin] Like Button

https://developers.facebook.com/docs/reference/plugins/like/

Get Code:
1.Include the JavaScript SDK on your page once, ideally right after the opening <body> tag.

<div id="fb-root"></div>
<script>(function(d, s, id) {
  var js, fjs = d.getElementsByTagName(s)[0];
  if (d.getElementById(id)) return;
  js = d.createElement(s); js.id = id;
  js.src = "//connect.facebook.net/zh_TW/all.js#xfbml=1";
  fjs.parentNode.insertBefore(js, fjs);

}(document, 'script', 'facebook-jssdk'));</script>

2.Place the code for your plugin wherever you want the plugin to appear on your page.

<div class="fb-like" data-href="http://localhost/game/index.html" data-send="true" data-width="450" data-show-faces="true"></div>

沒有留言:

張貼留言