diff --git a/src/Backend/Facebook.php b/src/Backend/Facebook.php index 9c994fb..1c1a6d0 100644 --- a/src/Backend/Facebook.php +++ b/src/Backend/Facebook.php @@ -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); diff --git a/tests/FacebookTest.php b/tests/FacebookTest.php index abe3c7f..27c431a 100644 --- a/tests/FacebookTest.php +++ b/tests/FacebookTest.php @@ -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()