Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Updated Facebook Base SDK for PHP 5.4.x
protected function getCode() {
$server_info = array_merge($_GET, $_POST, $_COOKIE);
if (isset($server_info['code'])) {
if ($this->state !== null &&
isset($server_info['state']) &&
$this->state === $server_info['state']) {
// CSRF state has done its job, so clear it
$this->state = null;
return $server_info['code'];
} else {
self::errorLog('CSRF state token does not match one provided.');
return false;
return false;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.