samlitowitz/facebook-php-business-sdk-guzzle-adapter

A Guzzle adapter for the Facebook PHP Business SDK

v18.0.2 2024-01-17 19:39 UTC

This package is auto-updated.

Last update: 2024-10-17 21:15:54 UTC


README

Install

composer require samlitowitz/facebook-php-business-sdk-guzzle-adapter

Use

Api::init(
	self::APP_ID,
	self::APP_SECRET,
	self::PAGE_ACCESS_TOKEN
);
$facebookClient = Api::instance()->getHttpClient();
$guzzleClient = new Client();
Api::instance()->getHttpClient()->setAdapter(new GuzzleAdapter($facebookClient, $guzzleClient));
$page = new Page(self::PAGE_ID);

$page->getSelf();
$this->assertEquals(self::PAGE_ID, $page->{PageFields::ID});