Skip to content

Commit 91a861f

Browse files
Use latest Graph API (v17.0) and enable parameter to choose version from caller
1 parent bb052da commit 91a861f

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

FacebookStrategy.php

+5-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ class FacebookStrategy extends OpauthStrategy {
88
'scope' => 'email', // Default scope for necessary permissions
99
);
1010

11-
private $api_version = 'v12.0'; // Update to the latest supported version
11+
private $api_version = 'v17.0'; // Update to the latest supported version
1212

1313
public function request() {
1414
$params = array(
@@ -119,6 +119,10 @@ private function me($access_token) {
119119
$fields = $this->strategy['fields'];
120120
}
121121

122+
if (!empty($this->strategy['api_version'])) {
123+
$this->api_version = $this->strategy['api_version'];
124+
}
125+
122126
$me = $this->serverGet(
123127
"https://graph.facebook.com/{$this->api_version}/me",
124128
array(

0 commit comments

Comments
 (0)