* @copyright Since 2007 PrestaShop SA and Contributors * @license https://opensource.org/licenses/AFL-3.0 Academic Free License version 3.0 */ namespace PrestaShop\Module\PrestashopFacebook\Factory; use Prestashop\ModuleLibGuzzleAdapter\ClientFactory; class FacebookEssentialsApiClientFactory implements ApiClientFactoryInterface { public const API_URL = 'https://graph.facebook.com'; /** * @var ClientFactory */ private $clientFactory; public function __construct(ClientFactory $clientFactory) { $this->clientFactory = $clientFactory; } public function createClient() { return $this->clientFactory->getClient([ 'base_url' => self::API_URL, 'headers' => [ 'Content-Type' => 'application/json', 'Accept' => 'application/json', ], ]); } }