Reputation: 3961
I am the group owner from said group. I am using an User token to access the wall posts like so:
SELECT post_id,
source_id,
actor_id,
target_id,
message,
like_info,
comment_info,
created_time,
attachment,
timeline_visibility,
privacy,
is_hidden,
is_published
FROM stream
WHERE type = 308
AND source_id = "482501211816484"
ORDER BY created_time DESC
How I can I get posts pending approval? am I using the wrong table? Is this possible with FQL or even with Graph?
Upvotes: 4
Views: 2859
Reputation: 20753
To check whether a post (in a group) in approved or not-
GET
the details of the concerning post using Graph API -
$result = $facebook->api("/POST_ID");
If the post is not approved yet, the keys: actions
and subscribed
would be missing from the result; this is because these posts are not eligible for these keys. So, you can create a check using either of the keys. For eg,
if (array_key_exists("actions",$result))
// the post is approved
else
// not approved
Upvotes: 4