Get Facebook user info with Mootools
2011
16
October
8:55 pm
Recently I found myself in need of a way for users to use their facebook details in a web app, and to link back to their facebook profile.
Anyway, I decided to put together a very basic demo to show how to retrieve a user’s data using Mootools!
Luckily, Facebook make this extremely easy by means of their Graph API!
This process is as simple as making a JSONP request to “http://graph.facebook.com/#USERNAME#”
var jsonRequest = new Request.JSONP({
url: 'http://graph.facebook.com/Sapphion',
onSuccess: function(person){
console.debug(person);
}
}).send();
The simple request shown above would retrieve basic information from my own Facebook profile and output it to the browser’s console.
You can view a demo here.
Posted in:
Design
Tagged with: