Skip to content

Commit

Permalink
Merge pull request #166 from richard67/update-fb-graph-api-7.0
Browse files Browse the repository at this point in the history
Update Facebook service to latest Facebook Graph API version v7.0
  • Loading branch information
compeak authored May 11, 2020
2 parents a29416c + 8ac5b5e commit f161794
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/v6.0/?id='.urlencode($url) . '&fields=engagement&access_token='
$query = 'https://graph.facebook.com/v7.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('/v6.0/', $request->getUri()->getPath());
$this->assertEquals('/v7.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 f161794

Please sign in to comment.