diff --git a/composer.json b/composer.json index 014c86a..e10bcf7 100644 --- a/composer.json +++ b/composer.json @@ -12,7 +12,7 @@ "require": { "php": ">=8.1", "ext-json": "*", - "facebook/php-business-sdk": "^25.0", + "facebook/php-business-sdk": "^25.0 || ^26.0", "php-http/discovery": "^1.20", "psr/http-client": "^1.0", "psr/http-client-implementation": "*", diff --git a/tests/Client/ClientTest.php b/tests/Client/ClientTest.php index 40699e9..d69d353 100644 --- a/tests/Client/ClientTest.php +++ b/tests/Client/ClientTest.php @@ -47,7 +47,7 @@ public function it_sends_event(): void $request = $httpClient->requests[0]; self::assertSame('POST', $request->getMethod()); - self::assertSame('https://graph.facebook.com/v25.0/pixel_id/events', (string) $request->getUri()); + self::assertSame(sprintf('https://graph.facebook.com/v%s/pixel_id/events', ApiConfig::APIVersion), (string) $request->getUri()); self::assertSame('data=%5B%7B%22event_name%22%3A%22Purchase%22%2C%22event_time%22%3A1658743659123%2C%22event_id%22%3A%22event_id%22%2C%22action_source%22%3A%22website%22%7D%5D', (string) $request->getBody()); }