Mad_Griffith
05-13-2012, 08:07 PM
Hello, I am trying to understand how to display the total number of Facebook group members. I managed to put this code together, but when I load it the page is blank:
<?php
require('facebook.php');
$config = array(
'appId' => '350224611710644',
'secret' => 'a604150d3b8184002d1f04448724d17c',
'cookie' => true
);
$facebook = new Facebook($config);
$query = urlencode('SELECT count(uid) from group_member WHERE gid = 457030854323270 limit 500 offset 500');
try {
$fbData = $facebook->api("/fql?q={$query}");
} catch (FacebookApiException $e) {
$fbData
= $e->getResult();
}
?>
<?php
require('facebook.php');
$config = array(
'appId' => '350224611710644',
'secret' => 'a604150d3b8184002d1f04448724d17c',
'cookie' => true
);
$facebook = new Facebook($config);
$query = urlencode('SELECT count(uid) from group_member WHERE gid = 457030854323270 limit 500 offset 500');
try {
$fbData = $facebook->api("/fql?q={$query}");
} catch (FacebookApiException $e) {
$fbData
= $e->getResult();
}
?>