updated logic for posting to facebook