A simple Python script to extract the posts(messages, ids) from Facebook pages/events etc and write them to a file. Just add in your APP_ID,APP_SECRET,the page name/id you want to extract posts from, and you're good to go.
Resource: simplebeautifuldata