Skip to content

Commit

Permalink
Merge pull request #164 from richard67/update-fb-graph-api-6.0
Browse files Browse the repository at this point in the history
Update Facebook service to latest Facebook Graph API version v6.0
  • Loading branch information
compeak authored Feb 28, 2020
2 parents 9ecf5fe + 9633228 commit 7a074d3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Backend/Facebook.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public function setConfig(array $config)
public function getRequest($url)
{
$accessToken = urlencode($this->config['app_id']) .'|'.urlencode($this->config['secret']);
$query = 'https://graph.facebook.com/v5.0/?id='.urlencode($url) . '&fields=engagement&access_token='
$query = 'https://graph.facebook.com/v6.0/?id='.urlencode($url) . '&fields=engagement&access_token='
. $accessToken;

return new \GuzzleHttp\Psr7\Request('GET', $query);
Expand Down
2 changes: 1 addition & 1 deletion tests/FacebookTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public function testUsesGraphApi()
$request = $facebook->getRequest('http://www.heise.de');

$this->assertEquals('graph.facebook.com', $request->getUri()->getHost());
$this->assertEquals('/v5.0/', $request->getUri()->getPath());
$this->assertEquals('/v6.0/', $request->getUri()->getPath());
$this->assertEquals(
'id='.urlencode('http://www.heise.de').'&fields=engagement&access_token=foo%7Cbar',
$request->getUri()->getQuery()
Expand Down

0 comments on commit 7a074d3

Please sign in to comment.