PHPackages                             bufferapp/facebook-api-wrapper - 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. bufferapp/facebook-api-wrapper

AbandonedPackage[API Development](/categories/api)

bufferapp/facebook-api-wrapper
==============================

A PHP SDK for the Facebook API

2.5.0(1y ago)1317.3k↓50%6[1 PRs](https://github.com/bufferapp/facebook-api-wrapper/pulls)Apache-2.0PHPPHP &gt;=7.4

Since Jun 21Pushed 11mo ago24 watchersCompare

[ Source](https://github.com/bufferapp/facebook-api-wrapper)[ Packagist](https://packagist.org/packages/bufferapp/facebook-api-wrapper)[ RSS](/packages/bufferapp-facebook-api-wrapper/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (10)Dependencies (3)Versions (46)Used By (0)

Deprecated
==========

[](#deprecated)

As of May 6th, 2025, this library is deprecated and no new changes will be applied.

facebook-api-wrapper
====================

[](#facebook-api-wrapper)

Buffer's Facebook PHP API wrapper

Our FB API wrapper library provides helpful utility methods to work with [FB Graph API](https://developers.facebook.com/docs/graph-api).

Methods supported in the wrapper:

- `setAccessToken($accessToken)`
- `getPageInsightsMetricsData($pageId, $insightsMetrics, $since, $until)`
- `getPagePostGraphMetricsData($pageId, $postId, $metrics)`
- `getPageBatchPostsGraphMetricsData($postIds, $metrics)`
- `getPagePostInsightsMetricData($pageId, $postId, $insightsMetrics)`
- `getPageBatchPostsInsightsMetricData($postIds, $insightsMetrics)`
- `getPagePosts($pageId, $since, $until, $limit = 100)`

Requirement &amp; Installation
------------------------------

[](#requirement--installation)

This package requires PHP 5.6 or higher.

Open your composer.json file and add the new required package.

```
   "bufferapp/facebook-api-wrapper": "^1.0.0"

```

Next, open a terminal and run.

```
composer update

```

Now you can reference the wrapper anywhere as `use Buffer\Facebook\Facebook;`.

Tests
-----

[](#tests)

Before running the tests make sure you have installed all the dependancies with `composer install`.

The tests can be executed by using this command from the base directory:

```
bin/phpunit -c phpunit.xml --bootstrap vendor/autoload.php

```

Contributing
------------

[](#contributing)

You're welcome to contribute to this repo.

Did you find a bug?
-------------------

[](#did-you-find-a-bug)

If you found a bug then please go ahead and [open a GitHub issue](https://github.com/bufferapp/facebook-api-wrapper/issues), and we'll try to fix it as soon as possible.

###  Health Score

48

—

FairBetter than 94% of packages

Maintenance49

Moderate activity, may be stable

Popularity32

Limited adoption so far

Community23

Small or concentrated contributor base

Maturity76

Established project with proven stability

 Bus Factor3

3 contributors hold 50%+ of commits

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 ~75 days

Recently: every ~114 days

Total

39

Last Release

399d ago

Major Versions

1.8.7 → 2.0.02023-01-24

1.8.8 → 2.1.12023-04-06

PHP version history (2 changes)1.0.0PHP &gt;=5.6.4

2.0.0PHP &gt;=7.4

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/798826?v=4)[Buffer](/maintainers/bufferapp)[@bufferapp](https://github.com/bufferapp)

![](https://avatars.githubusercontent.com/u/720667?v=4)[Mike San Román](/maintainers/msanroman)[@msanroman](https://github.com/msanroman)

---

Top Contributors

[![msanroman](https://avatars.githubusercontent.com/u/720667?v=4)](https://github.com/msanroman "msanroman (25 commits)")[![dinostheo](https://avatars.githubusercontent.com/u/1632257?v=4)](https://github.com/dinostheo "dinostheo (22 commits)")[![tiggreen](https://avatars.githubusercontent.com/u/3679842?v=4)](https://github.com/tiggreen "tiggreen (21 commits)")[![federicoweber](https://avatars.githubusercontent.com/u/992920?v=4)](https://github.com/federicoweber "federicoweber (17 commits)")[![amooabeebadesina](https://avatars.githubusercontent.com/u/19835966?v=4)](https://github.com/amooabeebadesina "amooabeebadesina (7 commits)")[![dace](https://avatars.githubusercontent.com/u/10112294?v=4)](https://github.com/dace "dace (4 commits)")[![josem](https://avatars.githubusercontent.com/u/567695?v=4)](https://github.com/josem "josem (2 commits)")[![RafLeszczynski](https://avatars.githubusercontent.com/u/859645?v=4)](https://github.com/RafLeszczynski "RafLeszczynski (2 commits)")

---

Tags

facebookFacebook-apifacebook php

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/bufferapp-facebook-api-wrapper/health.svg)

```
[![Health](https://phpackages.com/badges/bufferapp-facebook-api-wrapper/health.svg)](https://phpackages.com/packages/bufferapp-facebook-api-wrapper)
```

###  Alternatives

[facebook/php-business-sdk

PHP SDK for Facebook Business

90121.9M34](/packages/facebook-php-business-sdk)[facebook/php-ads-sdk

PHP SDK for Facebook Business

9014.1M8](/packages/facebook-php-ads-sdk)[nickdnk/graph-sdk

Facebook SDK for PHP 8+

452.0M6](/packages/nickdnk-graph-sdk)[janu-software/facebook-php-sdk

Alternative toolkit for Facebook Graph API

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

Facebook SDK for PHP

42728.5k1](/packages/joelbutcher-facebook-graph-sdk)[kerox/messenger

PHP Library to interact with Facebook Messenger Platform

58302.1k1](/packages/kerox-messenger)

PHPackages © 2026

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