Download the PHP package nickdnk/graph-sdk without Composer
On this page you can find all versions of the php package nickdnk/graph-sdk. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download nickdnk/graph-sdk
More information about nickdnk/graph-sdk
Files in nickdnk/graph-sdk
Package graph-sdk
Short Description Facebook SDK for PHP compatible with PHP8
License proprietary
Homepage https://github.com/nickdnk/php-graph-sdk
Informations about the package graph-sdk
Facebook SDK for PHP
This is an unofficial version of Facebook's PHP SDK designed for PHP 7/8+. It is being maintained and tested against the newest PHP versions. You can use this in place of version 5.x
of Facebook's deprecated facebook/graph-sdk
package.
PHP 7.3 is required.
This repository contains the open source PHP SDK that allows you to access the Facebook Platform from your PHP app.
Installation
The Facebook PHP SDK can be installed with Composer. Run this command:
By default, the request will be made via a Facebook\HttpClients\FacebookHttpClientInterface
. The default
implementation depends on the available PHP extension/packages. In order of priority:
- Package
guzzlehttp/guzzle
(version 6 or 7):Facebook\HttpClients\FacebookGuzzleHttpClient
- ext-curl:
Facebook\HttpClients\FacebookCurlHttpClient
- Fallback:
Facebook\HttpClients\FacebookStreamHttpClient
Usage
Simple GET example of a user's profile.
Complete documentation, installation instructions, and examples are available here.
Tests
- Composer is a prerequisite for running the tests. Install composer globally, then
run
composer install
to install required files. - Create a test app on Facebook Developers, then
create
tests/FacebookTestCredentials.php
fromtests/FacebookTestCredentials.php.dist
and edit it to add your credentials. - The tests can be executed by running this command from the root directory:
By default, the tests will send live HTTP requests to the Graph API. If you are without an internet connection you can
skip these tests by excluding the integration
group.
License
Please see the license file for more information.