Facebook API Check if Post Exists

Nathan Riley
Nathan Riley used Ask the Experts™
on
I'm pulling back some data on my Facebook page posts via the graph method in my PHP page.

https://developers.facebook.com/tools/explorer/145634995501895/?session_id=1652525668367092

This all works because the post exists.  But I need a method to check if the post exists and hasn't been deleted.  Here is an example of a post I posted, then deleted.
https://developers.facebook.com/tools/explorer/145634995501895/?session_id=1659738924262589

It just brings back an error.  I need a way in my php code to check. Is there no Facebook API call to check if exists?
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Founder
Commented:
I ended up looking and if the API returned an error code of 100 I mark them as they have been deleted.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial