Yes, you absolutely can test web apps locally that use Facebook’s Graph API. I’ve seen a number of blog posts that tell you this isn’t possible and that you need a a fully qualified domain name (FQDN) such as http://www.xyz.com. But, I’m writing this post to correct that misinformation.
I’d call this a best practice for testing Facebook APIs. It doesn’t require an FQDN until you are ready to deploy the final app on a production server.