FQL does not have a COUNT function in its API, so you will have to receive all messages and read them yourself.
You can use something like PHP to do it like this:
$fqlAPIParams = array( 'method' => 'fql.query', 'query' => ' SELECT post_id FROM stream WHERE actor_id = '.$pageId.' AND source_id = '.$pageId.' LIMIT 999999' ); $result = $facebook->api($fqlAPIParams); $postCount = 0; foreach( $result as $post ) { $postCount++; }
Hope this can help someone, as the question is pretty old.
source share