if you use php php sdk ...
the script callback needs to be changed
$accessToken = $helper->getAccessToken();
to
$accessToken = $helper->getAccessToken('https://example.com/fb-callback.php');
where ' https://example.com/fb-callback.php ' is the URI for your script callback
and add this URI to “OAuth Valid URIs” in “Application Configuration” on Facebook-> My Applications-> Settings-> Advanced
source share