We can only tell you that your whatssapp application creates a folder inside your Smartphone root directory where it stores items like:
. Shared
.trash
Databases
Media
Profile Pictures
In addition your passwords and other important recording information as well as sent out items are store within this directory.
As for facebook, you'd have to ask facebook where is it they store their data for its truly a company secret.