Last active
August 29, 2015 14:12
-
-
Save stephanebruckert/c97773cf2ffbc6f53648 to your computer and use it in GitHub Desktop.
Get like, share and comment count from Facebook post link (FQL request) http://stackoverflow.com/q/19061937/1515819
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
SELECT like_info.like_count, comment_info.comment_count, share_count | |
FROM stream | |
WHERE post_id IN ( | |
SELECT concat(id,'_', substr("https://www.facebook.com/Macklemore/posts/10153256675935268", strpos("https://www.facebook.com/Macklemore/posts/10153256675935268", '/posts')+7, strlen("https://www.facebook.com/Macklemore/posts/10153256675935268"))) | |
FROM profile WHERE username IN ( | |
SELECT substr(url, strpos(url, 'facebook.com/')+13, strpos(url, '/posts')-strpos(url, 'facebook.com/')-13) | |
FROM object_url | |
WHERE url = "https://www.facebook.com/Macklemore/posts/10153256675935268")) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment