Skip to content

Instantly share code, notes, and snippets.

View NicholasRBowers's full-sized avatar

Nicholas Bowers NicholasRBowers

View GitHub Profile
$counties = array(
"Alabama" => array(
"Autauga County",
"Baldwin County",
"Barbour County",
"Bibb County",
"Blount County",
"Bullock County",
"Butler County",
"Calhoun County",
@NicholasRBowers
NicholasRBowers / fb-extract-comments.php
Created November 20, 2012 20:46 — forked from stephanschubert/fb-extract-comments.php
Extract comments from your page on Facebook
<?php
// Displays comments for a certain URL.
$url = 'http://developers.facebook.com/docs/reference/fql/comment/';
// FQL multi-query to fetch all the data we need to display comments.
$queries = array(
'q1' => 'SELECT post_fbid, fromid, object_id, text, time FROM comment WHERE object_id IN (SELECT comments_fbid FROM link_stat WHERE url ="'.$url.'")',
'q2' => 'SELECT post_fbid, fromid, object_id, text, time FROM comment WHERE object_id IN (SELECT post_fbid FROM #q1)',
'q3' => 'SELECT name, id, url, pic_square FROM profile WHERE id IN (SELECT fromid FROM #q1) or id in (SELECT fromid FROM #q2)',