Advertisement
Guest User

Untitled

a guest
Dec 22nd, 2014
150
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.65 KB | None | 0 0
  1. <h2>Curta para conferir nossas ofertas</h2>
  2. <div class="fb-like" data-href="http://www.lojasmm.com" data-send="false" data-width="450" data-show-faces="false"></div>
  3.  
  4. <script type="text/javascript">
  5. window.fbAsyncInit = function () {
  6. FB.init({appId: '682539928509951', status: true, cookie: true, xfbml: true});
  7. FB.Event.subscribe('edge.create', function (href, widget) {
  8. //alert('Legal, você curtiu o link: ' + href);
  9. document.write('Vai ou exibe página de promoções');
  10. });
  11.  
  12. FB.Event.subscribe('edge.remove', function (href, widget) {
  13. alert('Descurtiu');
  14. });
  15. };
  16.  
  17. (function (d, s, id) {
  18. var js, fjs = d.getElementsByTagName(s)[0];
  19. if (d.getElementById(id))
  20. return;
  21. js = d.createElement(s);
  22. js.id = id;
  23. js.src = "//connect.facebook.net/pt_BR/all.js";
  24. fjs.parentNode.insertBefore(js, fjs);
  25. }(document, 'script', 'facebook-jssdk'));
  26.  
  27.  
  28.  
  29. FB.login(function (response) {
  30. if (response.authResponse) {
  31. console.log('Welcome! Fetching your information.... ');
  32. FB.api('/me', function (response) {
  33. console.log('Good to see you, ' + response.name + '.');
  34. });
  35. } else {
  36. console.log('User cancelled login or did not fully authorize.');
  37. }
  38. });
  39.  
  40. </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement