PHPackages                             scottybo/bufferapp - 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. scottybo/bufferapp

ActiveLibrary[API Development](/categories/api)

scottybo/bufferapp
==================

Composer ready version of Simple PHP class for Buffer's API

v1.1.5(7y ago)01471MITPHP

Since Sep 10Pushed 7y ago1 watchersCompare

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

READMEChangelog (7)DependenciesVersions (8)Used By (0)

bufferapp
=========

[](#bufferapp)

Composer ready version of

Simple PHP library for the amazing buffer at

Why?
====

[](#why)

There wasn't one listed on Buffer's website and a quick Google search didn't turn one up. For most use cases Buffer's plugins will work just fine, but for those of you looking to pump lots of info into buffer via PHP this may help!

Using this library
==================

[](#using-this-library)

1. Include the file
    - Make sure you've got `buffer.php` included
2. Create a new Buffer app
    - You'll need to [register an app](http://bufferapp.com/developers/api) with buffer before you can begin
    - Initialize like this `$buffer = new BufferApp($client_id, $client_secret, $callback_url);` The `callback_url` needs to be the exact same as the app you registered
3. Start adding buffers!
    - Once you're in you really only need to check `$buffer->ok` to see if you can perform actions, and then `$buffer->go($endpoint, $data)` to get going!

##### Image Attachments

[](#image-attachments)

The Buffer API documentation has a list of the `media` parameters for creating an update.

Their [example here](http://bufferapp.com/developers/api/updates#updatescreate) includes `media[link]`, `media[title]` &amp; `media[description]`.

To get the desired result you will need to use `media[picture]` *and* `media[thumbnail]`.

Example
=======

[](#example)

First thing's first: start a session and require `buffer.php`. We're going to be storing the `access_token` in the session for now.

```
	session_start();
	require('buffer.php');

```

Set this thing up with your credentials and your callback URL. Remember: `callback_url` must match what you've got in Buffer exactly!

```
	$client_id = '';
	$client_secret = '';
	$callback_url = 'http://127.0.0.1/callback';

```

Set up the new buffer client. This is a super simple action that does a few things under the hood. If `$_GET['code']` is set on this page it assumes it came from Buffer and will attempt to trade that code for an `access_token`. If there is an `access_token` in the session it will be loaded in.

```
	$buffer = new BufferApp($client_id, $client_secret, $callback_url);

```

Once we've got an `access_token` set the `$buffer->ok` property will read true. It is false by default. Now that we've received access we are free to run queries against Buffer endpoints! Below we pull the list of profiles associated with the logged in buffer user and submit a test update to each one.

```
	if (!$buffer->ok) {
		echo 'Connect to Buffer!';
	} else {
		//this pulls all of the logged in user's profiles
		$profiles = $buffer->go('/profiles');

		if (is_array($profiles)) {
			foreach ($profiles as $profile) {
				//this creates a status on each one
				$buffer->go('/updates/create', array('text' => 'My first status update from bufferapp-php worked!', 'profile_ids[]' => $profile->id));
			}
		}
	}

```

Storage
=======

[](#storage)

Right now this baby just stores the `access_token` in `$_SESSION['oauth']['buffer']['access_token']`. If you are doing something serious with this you should probably rewrite the `store_access_token()` and `retrieve_access_token()` methods.

Realistically these methods should be replaced with some sort of abstraction -- pull requests are welcome!

License
=======

[](#license)

Do whatever you like with this. Feel free (but not obligated) to [drop me a line](http://kevin.fm) if it helps!

###  Health Score

30

—

LowBetter than 61% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor1

Top contributor holds 53.8% 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 ~28 days

Recently: every ~42 days

Total

7

Last Release

2717d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/11498904?v=4)[Scott Bowler](/maintainers/scottybo)[@scottybo](https://github.com/scottybo)

---

Top Contributors

[![thewebguy](https://avatars.githubusercontent.com/u/1873855?v=4)](https://github.com/thewebguy "thewebguy (14 commits)")[![scottybo](https://avatars.githubusercontent.com/u/11498904?v=4)](https://github.com/scottybo "scottybo (11 commits)")[![katzien](https://avatars.githubusercontent.com/u/690965?v=4)](https://github.com/katzien "katzien (1 commits)")

---

Tags

Buffer

### Embed Badge

![Health badge](/badges/scottybo-bufferapp/health.svg)

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

###  Alternatives

[exsyst/swagger

A php library to manipulate Swagger specifications

35816.5M7](/packages/exsyst-swagger)[lucasdotvin/laravel-soulbscription

A straightforward interface to handle subscriptions and features consumption.

709209.3k](/packages/lucasdotvin-laravel-soulbscription)[pocketmine/bedrock-protocol

An implementation of the Minecraft: Bedrock Edition protocol in PHP

172451.7k19](/packages/pocketmine-bedrock-protocol)[botman/driver-telegram

Telegram driver for BotMan

94467.0k6](/packages/botman-driver-telegram)[ipalaus/buffer-php-sdk

Unofficial Buffer SDK for PHP.

148.9k](/packages/ipalaus-buffer-php-sdk)

PHPackages © 2026

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