PHPackages                             singly/singly - 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. singly/singly

ActiveLibrary[API Development](/categories/api)

singly/singly
=============

A PHP library for the Singly API

1121PHP

Since Jan 12Pushed 12y ago1 watchersCompare

[ Source](https://github.com/TomHAnderson/SinglyClient-PHP)[ Packagist](https://packagist.org/packages/singly/singly)[ RSS](/packages/singly-singly/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependenciesVersions (2)Used By (0)

Singly PHP Library
==================

[](#singly-php-library)

This library abstracts the Singly API to PHP service object.

Example
-------

[](#example)

An example application is included on the `example` branch. See the README.md in that branch for details.

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

[](#installation)

1. edit `composer.json` file with following contents:

    ```
    "require": {
       "singly/singly": "dev-master"
    }
    ```
2. install composer via `curl -s http://getcomposer.org/installer | php` (on windows, download  and execute it with PHP)
3. run `php composer.phar install`

Use
---

[](#use)

Create the Singly service

```
use \Singly\Service\Singly;

Singly::configure($clientId, $clientSecret, $redirectUri);
Singly::setAccessToken('access_token');

// Get a login url to authorize a service
$loginUrl = Singly::getLoginUrl('facebook');
```

De-authorize a service. This will un-link a service from the user's profile.

```
Singly::deleteService('facebook');
```

De-authorize all services. This will delete a user's profile.

```
Singly::deleteAll();
```

Get an access token in a redirectUri / callback handler. Getting an access token with code sets to access token too.

```
$code = $_GET['code'];
Singly::getAccessToken($code);
```

API Services

```
// Get Login URL
Singly::getLoginUrl($service, $parameters = array());
// Valid options: access_token, scope, flag

// Simple Unified Profile
Singly::getProfile($access_token = null);

// Profiles
Singly::getProfiles($service = null, $parameters = array());

// Services
Singly::getServices($service = null, $endpoint = null, $parameters = array());

// Types
Singly::getTypes($type = null, $parameters = array());

// Post to Types
// https://singly.com/docs/sharing
Singly::postTypes($type, $parameters = array());

// Global Items
Singly::getById($id);

// Proxy to Service API
Singly::getProxy($service, $path, $parameters = array())

// By URL
Singly::getByUrl($url, $parameters = array());

// By Contact ID
Singly::getByContact($service, $id, $parameters = array());

// Friends
// https://singly.com/docs/friends
Singly::getFriends($service = null, $parameters = array());
```

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity43

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 94.7% 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/49dd7d9dba889ac674b0da447d9c1e69d1128dc3ccbaef98ba83d6ee519fc2d6?d=identicon)[tom\_anderson](/maintainers/tom_anderson)

---

Top Contributors

[![TomHAnderson](https://avatars.githubusercontent.com/u/493920?v=4)](https://github.com/TomHAnderson "TomHAnderson (71 commits)")[![scragg0x](https://avatars.githubusercontent.com/u/222611?v=4)](https://github.com/scragg0x "scragg0x (4 commits)")

### Embed Badge

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

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

###  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)
