Facebook php example: Fatal error-Collection of common programming errors

I am trying to make a php facebook app. Downloaded the Facebook php sdk and used the example.php (with my own appId and secret) to try to get a example app running. I can use the example app, but when I click login with facebook and and authenticate the app it throws this exception:

“Fatal error: Uncaught GraphMethodException: Unsupported get request. thrown in /var/www/facebook_test/base_facebook.php on line 1264”

Below is the code I am using.

Any guidance would be greatly appreciated.