Commit a6f15f42 authored by Sonia Zorba's avatar Sonia Zorba
Browse files

Adapted Facebook login to newer API version

parent 4e0c3d3a
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -42,7 +42,9 @@ if (isset($_GET['state'])) {
}

try {
    $accessToken = $helper->getAccessToken();
    // obtaining current URL without query string
    $url = "https://$_SERVER[HTTP_HOST]" . strtok($_SERVER["REQUEST_URI"], '?');
    $accessToken = $helper->getAccessToken($url);
} catch (Facebook\Exceptions\FacebookResponseException $e) {
    // When Graph returns an error
    http_response_code(500);
+1 −1
Original line number Diff line number Diff line
@@ -63,7 +63,7 @@ $AUTHENTICATION_METHODS = array(
    'Facebook' => array(
        'id' => "XXXXXX",
        'secret' => "XXXXXX",
        'version' => "v2.2",
        'version' => "v3.0",
        'callback' => $BASE_PATH . "/auth/oauth2/facebook_token.php"),
    'LinkedIn' => array(
        'id' => 'XXXXXX',