samlitowitz / facebook-php-business-sdk-guzzle-adapter
A Guzzle adapter for the Facebook PHP Business SDK
Installs: 6 541
Dependents: 0
Suggesters: 0
Security: 0
Stars: 3
Watchers: 1
Forks: 2
Open Issues: 1
Requires
- php: >=8.0
- facebook/php-business-sdk: 18.0.2
- guzzlehttp/guzzle: ^6.5 || ^7.0
Requires (Dev)
- phpunit/phpunit: ^9.0.0
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});