PHPackages                             sledgehammer/facebook - 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. sledgehammer/facebook

ActiveLibrary[API Development](/categories/api)

sledgehammer/facebook
=====================

Sledgehammer Facebook module. An OOP layer on top of the official Facebook SDK.

12.10.2(13y ago)1301CC-BY-SA-3.0PHP

Since Oct 12Pushed 13y ago5 watchersCompare

[ Source](https://github.com/sledgehammer/facebook)[ Packagist](https://packagist.org/packages/sledgehammer/facebook)[ RSS](/packages/sledgehammer-facebook/feed)WikiDiscussions master Synced 1w ago

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

Facebook
========

[](#facebook)

Object oriented API for using Facebook's Social Graph.

Features
--------

[](#features)

- Autocompletion for common facebook objects.
- Automaticly fetches all allowed fields.
- Gives hint which permissions are missing when you access a (maybe) not-allowed property or connection.
- Fetches connected objects as properties. $me-&gt;friends
- Connected objects are Collection object, for easy filtering &amp; sorting. $me-&gt;friends-&gt;orderBy('last\_name');
- Caches userfields and friends when using the FacebookUser object for improved performance.
- Lazily fetches objectdata. No api calls for data you don't use.

Improvements in the Facebook class.
-----------------------------------

[](#improvements-in-the-facebook-class)

- Easy login() or automatic login.
- shorthand for get/post/delete requests. Example: Facebook::get('me')
- shorthand for executing a fql query.
- Validates requested permissions.
- Logs api calls and measures executionTime.
- api() accepts $parameters\['fields'\] as an array.
- all() fetches multiple pages in a paginated result and returns the merged array.
- Singleton pattern, access Facebook from anywhere in your application.
- Add "local\_cache"=&gt; true to the parameters and the the results of the api call are cached.

Idea's / Todo
-------------

[](#ideas--todo)

- notice() when the (automatic) pageLimit is reached.
- Implement all documented facebook entities &amp; connections.
- Implement writing api as methods in the GraphObject.
- Implement ActiveRecord methods. save(), delete()
- Greedy mode (vs Strict mode) which retrieves all fields we might\*1 have access to. (\*1: depends on privacy settings)
- Ability to make asynchronous requests. "async" =&gt; true

###  Health Score

29

—

LowBetter than 59% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

Top contributor holds 97.6% 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 ~4 days

Total

2

Last Release

4961d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/207248?v=4)[Bob Fanger](/maintainers/bfanger)[@bfanger](https://github.com/bfanger)

---

Top Contributors

[![bfanger](https://avatars.githubusercontent.com/u/207248?v=4)](https://github.com/bfanger "bfanger (41 commits)")[![havelaer](https://avatars.githubusercontent.com/u/817113?v=4)](https://github.com/havelaer "havelaer (1 commits)")

### Embed Badge

![Health badge](/badges/sledgehammer-facebook/health.svg)

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

###  Alternatives

[twilio/sdk

A PHP wrapper for Twilio's API

1.6k92.9M272](/packages/twilio-sdk)[knplabs/github-api

GitHub API v3 client

2.2k15.8M187](/packages/knplabs-github-api)[facebook/php-business-sdk

PHP SDK for Facebook Business

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

PHP wrapper for the Meilisearch API

73813.7M114](/packages/meilisearch-meilisearch-php)[google/common-protos

Google API Common Protos for PHP

173103.7M50](/packages/google-common-protos)[hubspot/api-client

Hubspot API client

23414.2M16](/packages/hubspot-api-client)

PHPackages © 2026

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