PHPackages                             one23/php-8-graph-sdk - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. one23/php-8-graph-sdk

ActiveLibrary[API Development](/categories/api)

one23/php-8-graph-sdk
=====================

Facebook SDK for PHP 8

1.0.1(3y ago)03.0k↓33.3%MITPHPPHP ~8.1

Since Dec 15Pushed 3y ago1 watchersCompare

[ Source](https://github.com/FlexIDK/php-8-graph-sdk)[ Packagist](https://packagist.org/packages/one23/php-8-graph-sdk)[ Docs](https://github.com/FlexIDK/php-8-graph-sdk)[ RSS](/packages/one23-php-8-graph-sdk/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (3)Versions (3)Used By (0)

Facebook SDK for PHP 8
======================

[](#facebook-sdk-for-php-8)

This repository contains the open source PHP SDK that allows you to access the Facebook Platform from your PHP app.

Installation
------------

[](#installation)

```
composer require one23/php-8-graph-sdk
```

Fork
----

[](#fork)

This repository fork from deprecate [facebook/graph-sdk](https://github.com/facebookarchive/php-graph-sdk).

What's different
----------------

[](#whats-different)

- Namespace: \\Facebook\\ -&gt; \\One23\\GraphSdk
- Facebook::\_\_construct require 'default\_graph\_version'
- **Remove deprecate class:**
    - GraphNodes\\GraphList -&gt; GraphEdge
    - GraphNodes\\GraphObject -&gt; GraphNode
    - GraphNodes\\GraphObjectFactory -&gt; GraphNodeFactory
- **Remove traits:**
    - PseudoRandomStringGeneratorTrait
- **Replace deprecate methods:**
    - FacebookResponse
        - getGraphObject() -&gt; getGraphNode()
        - getGraphList() -&gt; getGraphEdge()
    - Authentication\\AccessTokenMetadata
        - getProperty() -&gt; getField()
    - GraphNodes\\Collection
        - getProperty() -&gt; getField()
- Rename &amp;&amp; refactoring class:
    - FacebookApp -&gt; App
    - FacebookBatchRequest -&gt; BatchRequest
    - FacebookBatchResponse -&gt; BatchResponse
    - FacebookClient -&gt; Client
    - FacebookRequest -&gt; Request
    - FacebookResponse -&gt; Response
    - Exceptions\\
        - FacebookAuthenticationException -&gt; AuthenticationException
        - FacebookAuthorizationException -&gt; AuthorizationException
        - FacebookClientException -&gt; ClientException
        - FacebookOtherException -&gt; OtherException
        - FacebookResponseException -&gt; ResponseException
        - FacebookResumableUploadException -&gt; ResumableUploadException
        - FacebookSDKException -&gt; SDKException
        - FacebookServerException -&gt; ServerException
        - FacebookThrottleException -&gt; ThrottleException
    - FileUpload\\
        - FacebookFile -&gt; File
        - FacebookResumableUploader -&gt; ResumableUploader
        - FacebookTransferChunk -&gt; TransferChunk
        - FacebookVideo -&gt; Video
    - Helpers\\
        - FacebookSignedRequestFromInputHelper -&gt; AbstractSignedRequestFromInput
    - HttpClients\\
        - FacebookCurl -&gt; Curl
        - FacebookStream - Stream
        - FacebookHttpClientInterface -&gt; Clients\\ClientInterface
        - FacebookCurlHttpClient -&gt; Clients\\Curl
        - FacebookGuzzleHttpClient -&gt; Clients\\Guzzle
        - FacebookStreamHttpClient -&gt; Clients\\Stream
    - PersistentData\\
        - PersistentDataInterface -&gt; Handlers\\PersistentDataInterface
        - FacebookMemoryPersistentDataHandler -&gt; Handlers\\Memory
        - FacebookSessionPersistentDataHandler -&gt; Handlers\\Session
    - PseudoRandomString\\
        - McryptPseudoRandomStringGenerator -&gt; Generators\\Mcrypt (deprecate)
        - OpenSslPseudoRandomStringGenerator -&gt; Generators\\OpenSsl
        - RandomBytesPseudoRandomStringGenerator -&gt; Generators\\RandomBytes
        - UrandomPseudoRandomStringGenerator -&gt; Generators\\Urandom
        - PseudoRandomStringGeneratorInterface -&gt; Generators\\GeneratorInterface
        - PseudoRandomStringGeneratorFactory -&gt; GeneratorFactory
    - Url\\
        - FacebookUrlManipulator -&gt; Url\\Manipulator
        - UrlDetectionInterface -&gt; Url\\DetectionInterface
- **Deprecate** (remove in next version):
    - FacebookApp
    - FacebookBatchRequest
    - FacebookBatchResponse
    - FacebookClient
    - FacebookRequest
    - FacebookResponse
    - Exceptions\\
        - FacebookAuthenticationException
        - FacebookAuthorizationException
        - FacebookClientException
        - FacebookOtherException
        - FacebookResponseException
        - FacebookResumableUploadException
        - FacebookSDKException
        - FacebookServerException
        - FacebookThrottleException
    - FileUpload\\
        - FacebookFile
        - FacebookResumableUploader
        - FacebookTransferChunk
        - FacebookVideo
    - Helpers\\
        - FacebookSignedRequestFromInputHelper
    - HttpClients\\
        - FacebookCurl
        - FacebookCurlHttpClient
        - FacebookGuzzleHttpClient
        - FacebookHttpClientInterface
        - FacebookStream
        - FacebookStreamHttpClient
    - PersistentData\\
        - PersistentDataInterface
        - FacebookMemoryPersistentDataHandler
        - FacebookSessionPersistentDataHandler
    - PseudoRandomString\\
        - McryptPseudoRandomStringGenerator
        - OpenSslPseudoRandomStringGenerator
        - PseudoRandomStringGeneratorFactory
        - PseudoRandomStringGeneratorInterface
        - RandomBytesPseudoRandomStringGenerator
        - UrandomPseudoRandomStringGenerator
        - **Generators\\Mcrypt**

What's new
----------

[](#whats-new)

- Support PHP 8.1
- Fix guzzle request
- Global exception: \\One23\\GraphSdk\\Exception
- FileUpload\\Mimetypes - replace to \\GuzzleHttp\\Psr7\\MimeType
- PersistentData\\Handlers\\SessionLaravel
- PersistentData\\Handlers\\SessionPhalcon

Usage
-----

[](#usage)

```
use \One23\GraphSdk;

$fb = new GraphSdk\Facebook([
  'app_id' => '{app-id}',
  'app_secret' => '{app-secret}',
  'default_graph_version' => 'v15.0',
  //'default_access_token' => '{access-token}', // optional
]);

// Use one of the helper classes to get a GraphSdk\Authentication\AccessToken entity.
//   $helper = $fb->getRedirectLoginHelper();
//   $helper = $fb->getJavaScriptHelper();
//   $helper = $fb->getCanvasHelper();
//   $helper = $fb->getPageTabHelper();

try {
  // Get the GraphSdk\GraphNodes\GraphUser object for the current user.
  // If you provided a 'default_access_token', the '{access-token}' is optional.
  $response = $fb->get('/me', '{access-token}');
}
catch(GraphSdk\Exceptions\ResponseException $e) {
  // When Graph returns an error
  echo 'Graph returned an error: ' . $e->getMessage();
  exit;
}
catch(GraphSdk\Exceptions\SDKException $e) {
  // When validation fails or other local issues
  echo 'Facebook SDK returned an error: ' . $e->getMessage();
  exit;
}

$me = $response->getGraphUser();
echo 'Logged in as ' . $me->getName();
```

Security
========

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

License
-------

[](#license)

[MIT](https://github.com/FlexIDK/php-8-graph-sdk/blob/master/LICENSE)

###  Health Score

29

—

LowBetter than 59% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity21

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity56

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

2

Last Release

1249d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/8311e2852f397956d5401ea17683fc8ee583dc68635cdff2fc2f8a5fefb23a98?d=identicon)[FlexIDK](/maintainers/FlexIDK)

---

Top Contributors

[![FlexIDK](https://avatars.githubusercontent.com/u/8653521?v=4)](https://github.com/FlexIDK "FlexIDK (12 commits)")

---

Tags

sdkfacebookphp-8

### Embed Badge

![Health badge](/badges/one23-php-8-graph-sdk/health.svg)

```
[![Health](https://phpackages.com/badges/one23-php-8-graph-sdk/health.svg)](https://phpackages.com/packages/one23-php-8-graph-sdk)
```

###  Alternatives

[janu-software/facebook-php-sdk

Alternative toolkit for Facebook Graph API

71684.8k2](/packages/janu-software-facebook-php-sdk)[yoti/yoti-php-sdk

Yoti SDK for quickly integrating your PHP backend with Yoti

27539.9k1](/packages/yoti-yoti-php-sdk)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
