Skip to content

Instantly share code, notes, and snippets.

@KDawg
Last active December 11, 2015 21:59
Show Gist options
  • Save KDawg/4666372 to your computer and use it in GitHub Desktop.
Save KDawg/4666372 to your computer and use it in GitHub Desktop.
Facebook JS SDK /me/likes service response
// Simply logging into Facebook via their JavaScript SDK:
FB.login(function(response) {
// assuming a valid response executing this FQL:
FB.api('/me/likes', function(response) {
console.log('me', response);
});
}, {scope: 'email,user_status,user_checkins,user_likes,user_interests,user_location,friends_location'});
// these are the contents of service response as a JS object
// SEE: http://www.facebook.com/35076686877 => user page
// SEE: http://graph.facebook.com/35076686877 => user JSON object
{
data: [{
category: "Non-profit organization"
created_time: "2013-01-02T22:37:57+0000"
id: "35076686877"
name: "Bogus Basin Mountain Recreation Area"
}, {
category: "Movie theater"
created_time: "2012-11-07T00:49:47+0000"
id: "283018785126463"
name: "Alamo Drafthouse Dallas / Fort Worth"
}, {
category: "Musician/band"
created_time: "2012-08-15T02:17:25+0000"
id: "52135755668"
name: "Beats Antique"
}, {
category: "Games/toys"
created_time: "2012-07-20T14:00:05+0000"
id: "142224495947"
name: "Roll2Play"
}, {
category: "Musician/band"
created_time: "2012-04-30T03:22:25+0000"
id: "35748599083"
name: "Air Review"
}, {
category: "Restaurant/cafe"
created_time: "2012-04-22T01:35:19+0000"
id: "196504850414890"
name: "Zenzero Bakery"
}, {
category: "Church/religious organization"
created_time: "2012-02-15T03:02:03+0000"
id: "203232477323"
name: "Irving Bible Church"
}, {
category: "Computers/technology"
created_time: "2011-06-02T19:33:06+0000"
id: "9445547199"
name: "Facebook Engineering"
}, {
category: "Museum/art gallery"
created_time: "2010-04-26T12:32:05+0000"
id: "52553638466"
name: "Dallas Museum of Art"
}
],
paging: {
next: "https://graph.facebook.com/1622858194/likes?access_token=AAAGiqQRrYC0BAEyuZAx5EiCwgeGSDjVDuvZAFbXsnxNCN1jtTxySb0YNCp64sFIXEQrh8G10dfI0FORcvqYEikCGJeqfdcfsPZAEfxO35JkKduYk0ZAL&limit=5000&offset=5000&__after_id=52553638466"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment