PHPackages                             noprotocol/socialcast - 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. noprotocol/socialcast

ActiveLibrary[API Development](/categories/api)

noprotocol/socialcast
=====================

PHP Client for Socialcast’s REST API

0.2(11y ago)4651PHP

Since Apr 17Pushed 10y ago2 watchersCompare

[ Source](https://github.com/noprotocol/socialcast-php)[ Packagist](https://packagist.org/packages/noprotocol/socialcast)[ RSS](/packages/noprotocol-socialcast/feed)WikiDiscussions master Synced yesterday

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

Socialcast PHP
==============

[](#socialcast-php)

[![Master Build Status](https://camo.githubusercontent.com/82d4a370292ca44b1b0d9f72d959ef96e87c0d441cdf3b044cdcd46091a844a6/68747470733a2f2f7365637572652e7472617669732d63692e6f72672f6e6f70726f746f636f6c2f736f6369616c636173742d7068702e706e673f6272616e63683d6d6173746572)](http://travis-ci.org/noprotocol/socialcast-php)

PHP client for [Socialcast’s REST API](http://developers.socialcast.com/api-documentation/)

Examples
--------

[](#examples)

### Using Basic Authentication

[](#using-basic-authentication)

```
$auth = new Socialcast\Auth\BasicAuth('demo', 'emily@socialcast.com', 'demo');
$socialcast = new Socialcast\Client($auth);

$user = $socialcast->getUserinfo();
$messages = $user->getMessages(['page' => 1, 'per_page' => 25]);
var_dump($messages);
```

### Using OAuth 2.0 Authentication

[](#using-oauth-20-authentication)

```
session_start();
$oauth = new Socialcast\Auth\OAuth('demo', $appId, $secret, $callbackUrl, function () {
    return $_SESSION['socialcast'];
}, function ($token) {
    $_SESSION['socialcast'] = $token;
});
// On the callback url page:
if (isset($_GET['code']) {
    $oauth->authenticate($_GET['code']);
    $socialcast = new Socialcast\Client($auth);
    if ($socialcast->getUserinfo()->id) {
        header('Location: /logged-in');
        exit();
    }
    echo 'Authentication failed: retry';

} else {
    header('Location: '.$oauth->getLoginUrl());
}
```

### Resources are Lazy

[](#resources-are-lazy)

To minimize the amount of api request the Resource objects such as the User resource are loaded lazily.

For example: `$user = $socialcast->getUser(123);` doesn't make any api calls until a property is accessed. var\_dump($user); // shows #response: false. $id = $user-&gt;id var\_dump($user); // shows #response: array with data.

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity54

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

Total

2

Last Release

4369d 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 (15 commits)")

---

Tags

socialcast

### Embed Badge

![Health badge](/badges/noprotocol-socialcast/health.svg)

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

###  Alternatives

[stripe/stripe-php

Stripe PHP Library

4.0k143.3M480](/packages/stripe-stripe-php)[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/gax

Google API Core for PHP

263103.1M454](/packages/google-gax)

PHPackages © 2026

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