There is nothing wrong with "huge pages". It's only that "huge pages" have a lot of posts and shares from fans. Indeed, the stream
table provides ALL the activities of the page.
The type
of a stream activity will be null
when the content comes from a user. When it comes from the page owner, it will be an int. See the description of the type
field on https://developers.facebook.com/docs/reference/fql/stream/.
The reason why you might get a null
as a like count
is that you came across a post which has the can_like
or can_comment
fields set to false
. These posts cannot be liked or commented because they are present outside of the page (i.e. on a user timeline or on particular website) and their owner didn't allow public likes or comments (even if publicly visible). If you are going to find such activities in the stream of the page is because they tagged the page in their message or photo.
Edit in answer to your first comment.
Question: why doesn't the following query give back the posts from the owner of the page:
SELECT actor_id, message
FROM stream
WHERE source_id = 40796308305
AND actor_id = 40796308305
Let's see how many results this query CAN give back:
SELECT actor_id, message
FROM stream
WHERE source_id = 40796308305
Okay, we get 17 results. Why 17? I don't know.
When you add AND actor_id = 40796308305
to your request, it will checks among these 17 results which ones have 40796308305
as an actor_id
.
Answer? None!
Because it only checks the 17 first results, you'll have to indicate a LIMIT
:
SELECT actor_id, message
FROM stream
WHERE source_id = 40796308305
AND actor_id = 40796308305
LIMIT 100
And there you get what you want.
This is one of the Facebook API's subtlety. Documented here: https://developers.facebook.com/blog/post/478/