I am developing an application for iOS that needs to detect when the user yawns.
What I did is include Open CV and find faces using a haar cascade, and then find mouth i
OpenCV also has face recognition / detection capabilities (see the examples that come with the openCV SDK). I think these would be a better place to look, as haar cascade doesn't really analyze the facial expressions the way you need it to. Try running the examples and see for yourself - you'll get real time data about the detected eyes / mouth and so.
Good luck