Created
October 28, 2013 13:16
-
-
Save sindresorhus/7196607 to your computer and use it in GitHub Desktop.
Get latest picture from Facebook user using FQL
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var endpoint = 'https://graph.facebook.com/fql'; | |
var accessToken = ''; | |
var userId = ''; | |
var q = 'SELECT caption, src_big FROM photo WHERE aid IN(SELECT aid FROM album WHERE owner = ' + userId + ' ORDER BY modified DESC LIMIT 1) ORDER BY modified DESC LIMIT 1'; | |
var url = endpoint + '?access_token=' + accessToken + '&q=' + q; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment