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-11-17 21:29:53 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});