Skip to content

Instantly share code, notes, and snippets.

View jucrouzet's full-sized avatar
🐔
Poulet

Julien CROUZET jucrouzet

🐔
Poulet
View GitHub Profile
// Once the SDK is initialized and user is logged in (see below), get friends list.
getFriendsList = function() {
FB.api('/me/friends', function(response) {
console.log(response);
});
};
// The SDK loaded callback (see below)
window.fbAsyncInit = function() {
(function(xhr) {
var request = new xhr();
request.open('GET', 'http://www.urldemonflux.com/blah', true);
request.onreadystatechange = function () {
if (request.readyState === xhr.LOADING) {
if(request.status === 200) {
window.console.log(request.responseText);
}
}