added enhanced facebook logic

extended current facebook logic