Angel S. Moreno
Angel S. Moreno

Reputation: 3961

how do i get pending group posts from facebook fql

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

Answers (1)

Sahil Mittal
Sahil Mittal

Reputation: 20753

To check whether a post (in a group) in approved or not-

  1. GET the details of the concerning post using Graph API -

    $result = $facebook->api("/POST_ID");
    
  2. 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

Related Questions