CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 15 of 24

Threaded View

  1. #1
    Join Date
    May 2012
    Posts
    13

    Total number of Facebook group members

    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:

    Code:
    <?php
        require('facebook.php');
        $config = array(
            'appId' => 'MYAPPID',
            'secret' => 'MYSECRETID',
            'cookie' => true
        );
        $facebook = new Facebook($config);
        $query = urlencode('SELECT count(uid) from group_member WHERE gid = MYGROUPID limit 500 offset 500');
        try {
            $fbData = $facebook->api("/fql?q={$query}");
        } catch (FacebookApiException $e) {
            $fbData
    		 = $e->getResult();
        };
      var_dump($fbData);
    ?>
    Last edited by Mad_Griffith; May 18th, 2012 at 05:59 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured