Your redirect_uri
starts http://localhost
- This type of URL wouldn't work for almost all users of your app, and isn't allowed by Facebook as a redirect URL - it would never be retrievable from outside your own machine, for example.
You can likely work around that if you're testing on localhost by setting up another DNS entry which resolves to your local machine and use that instead - many machines setup 'localhost.localdomain' as a local DNS name for that purpose