Social Vector a PHP Social Authentication Library

v1.0.0 2023-06-22 15:10 UTC

This package is auto-updated.

Last update: 2024-04-13 19:16:42 UTC


README

Social Vector enables developers to easily build social applications and tools to engage websites visitors and customers on a social level that starts off with social sign-in and extends to social sharing, users profiles, friends lists, activities streams, status updates and more.

The main goal of Social Vector is to act as an abstract API between your application and the various social networks APIs and identities providers such as Spaces, Facebook, Twitter and Google.

Usage

Social Vector provides a number of basic examples. You can also find complete Social Vector documentation at https://socialvector.github.io

$config = [
    'callback' => 'https://example.com/path/to/script.php',
    'keys' => [
        'key' => 'your-twitter-consumer-key',
        'secret' => 'your-twitter-consumer-secret',
    ],
];

try {
    $twitter = new SocialVector\Provider\Twitter($config);

    $twitter->authenticate();

    $accessToken = $twitter->getAccessToken();
    $userProfile = $twitter->getUserProfile();
    $apiResponse = $twitter->apiRequest('statuses/home_timeline.json');
}
catch (\Exception $e) {
    echo 'Oops, we ran into an issue! ' . $e->getMessage();
}

Requirements

  • PHP 5.4+
  • PHP Session
  • PHP cURL

Installation

To install Social Vector we recommend Composer, the now defacto dependency manager for PHP. Alternatively, you can download and use the latest release available at GitHub.

Questions, Help and Support?

For general questions (i.e, "how-to" questions), please consider using StackOverflow instead of the GitHub issues tracker. For convenience, we also have a [low-activity] Spaces group if you want to get help directly from the community.

License

Social Vector PHP Library is released under the terms of MIT License.

For the full Copyright Notice and Disclaimer, see COPYING.md.