Get JSON Facebook Graph API User Info with jQuery - Javascript jQuery

Javascript examples for jQuery:Json

Description

Get JSON Facebook Graph API User Info with jQuery

Demo Code

ResultView the demo in separate window

<html>
 <head> 
  <meta name="viewport" content="width=device-width, initial-scale=1"> 
  <script type="text/javascript" src="https://code.jquery.com/jquery-git.js"></script> 
  <script type="text/javascript">
    $(window).on('load', function() {
var fburl = "http://graph.facebook.com/btaylor?callback=?"
$.getJSON(fburl, function(data){//from   w ww.  jav a2  s. c om
     var name = data["name"];
     $("#profile").append("<h3>"+name+"</h3>");
});
    });

      </script> 
 </head> 
 <body> 
  <div id="profile"></div>  
 </body>
</html>

Related Tutorials