I am using koala gem and facebook api to fetch the recent 10 posts from facebook pages fo which I am admin. I store this in my local db and do some data crunching on it. Is there some way to know if a post fetched in my db has been deleted? I am currently using Koala gem for fetching the posts using the API:
page_graph = Koala::Facebook::GraphAPI.new(page.page_access_token)
post_infos = page_graph.get_connections("me", "posts")
The only way you can do this is to periodically check each post on Facebook using the API. If the API call to the
post_id
returns an error, then you know the post has been deleted, so you can safely delete it from your database too.