A Graph API query to me/home returns all posts from the logged in users newsfeed. In some cases, the results return a post where multiple users have posted on a single users timeline, for example, to wish the user on his Birthday.
To make it clear a bit further: Users A and B wrote on Z’s timeline for his birthday.
The entire applications works as it should. However, in cases like the example above, the post_id is wrong. In the above example for instance, it returns the “id” as 0_10150710912072539. Now from a lot of reading, and the fact that the app force closes when the user clicks to comment or something, I know the post ID is wrong. Is there a known fix for this?
Any guidance on this is appreciated.
From what I can see, those posts with post_id “0_XXXXXXXXXXX” are dummy roll-up posts you can’t interact with. You could filter any posts that begin this way, which would be the easy fix.
As a best practice, you should be looking for
stream.comments.can_post == trueon each post before your app tries to post a comment if you are using FQL, or for the presence of anactionwhere name == ‘Comment’ and a link is present using the API. This will prevent your users from trying to post comments where they have been disallowed.The posts in my stream that are roll_up events or items from someone I’ve subscribed to, but am not friends with all have
comments.can_post == falseand no Actions.