Advertisement
Guest User

Untitled

a guest
Nov 28th, 2014
171
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. (function (d, s, id) {
  2.         var js, fjs = d.getElementsByTagName(s)[0];
  3.         if (d.getElementById(id)) {
  4.             return;
  5.         }
  6.         js = d.createElement(s);
  7.         js.id = id;
  8.         js.src = "//connect.facebook.net/en_US/all.js";
  9.         fjs.parentNode.insertBefore(js, fjs);
  10.     }(document, 'script', 'facebook-jssdk'));
  11.  
  12.  
  13.     window.fbAsyncInit = function () {
  14.         FB.init({
  15.             appId: 'APP-ID',
  16.             status: true,
  17.             cookie: true,
  18.             xfbml: true,
  19.             version: 'v2.0'
  20.         });
  21.  
  22.         FB.getLoginStatus(function(loginResp)
  23.     {
  24.         $('#debug').append(JSON.stringify(loginResp)); // Debugging in FB Built-in browser
  25.         console.log(loginResp);
  26.  
  27.         // The rest of this method is placed after this.
  28.     });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement