2017 © Pedro Peláez
 

library hybridauth

Open source social sign on PHP library.

image

dominium/hybridauth

Open source social sign on PHP library.

  • Tuesday, February 9, 2016
  • by dominium
  • Repository
  • 1 Watchers
  • 0 Stars
  • 2 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Hybridauth 3.0.0-Remake

Build Status Scrutinizer Code Quality Latest Stable Version Total Downloads License Join the chat at https://gitter.im/hybridauth/hybridauth, (*1)

IMPORTANT: This is a work in progress and subject to changes at any time.

Hybridauth enables developers to easily build social applications and tools to engage websites visitors and customers on a social level by implementing social sign-in, social sharing, users profiles, friends list, activities stream, status updates and more., (*2)

The main goal of Hybridauth is to act as an abstract API between your application and various social apis and identities providers such as Facebook, Twitter and Google., (*3)

You can find complete Hybridauth documentation at https://hybridauth.github.io, (*4)

Usage

Hybridauth provides a number of basic examples., (*5)

..., (*6)

New way of doing things :
    require 'vendor/autoload.php';

    $config = [
        'callback' => 'http://localhost/hybridauth/examples/twitter.php',

        'keys' => [ 'key'    => 'your-consumer-key', 'secret' => 'your-consumer-secret' ]
    ];

    $twitter = new Hybridauth\Provider\Twitter( $config );

    try {
        $twitter->authenticate();

        $userProfile = $twitter->getUserProfile();

        $accessToken = $twitter->getAccessToken();

        $apiResponse = $twitter->apiRequest( 'statuses/home_timeline.json' );
    }
    catch( Exception $e ){
        echo "Ooophs, we ran into an issue! " . $e->getMessage();
    }
Legacy way (Similar to Hybridauth 2.x)

Please refer to Upgrade guide to make the neccessary changes to your existing application in order to make it work with HybridAuth 3.x., (*7)

    require 'hybridauth_autoload.php';

    $config = array(
        'base_url'  => 'http://localhost/hybridauth/examples/callback.php',

        'providers' => array(
            'GitHub' => array(
                'enabled' => true,
                'keys'    => array ( 'id' => '', 'secret' => '' ),
            )
        )
    );

    $hybridauth = new Hybridauth( $config );

    try{
        $github = $hybridauth->authenticate( "GitHub" );

        $user_profile = $github->getUserProfile();

        echo "Hi there " . $user_profile->displayName;
    }
    catch( Exception $e ){
        echo "Ooophs, we ran into an issue! " . $e->getMessage();
    }

Requirements

  • PHP 5.4
  • PHP Session
  • PHP CURL

Dependencies

Hybridauth depends on few external libraries that come already included in HybridAuth:, (*8)

Installation

We recommend that you always use the latest release available at https://github.com/hybridauth/hybridauth/releases, but we also support installation using Composer., (*9)

Note: Please, avoid using the master branch, as we usually keep it for development., (*10)

When using Composer, you have to add Hybridauth to your project dependencies:, (*11)

"require": {
    "hybridauth/hybridauth": "3.0.*"
}

Install Composer and Dependencies:, (*12)

$ curl -s http://getcomposer.org/installer | php
$ php composer.phar install

Get Involved

Hybridauth is a community driven project and accepts contributions of code and documentation from the community., (*13)

For more information, see https://hybridauth.github.io/getinvolved.html., (*14)

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] mailing list at Google Groups and a Gitter channel if you want to get help directly from the community., (*15)

Project maintainers

Thanks

Big thanks to everyone who have contributed to Hybridauth by submitting patches, new ideas, code reviews and constructive discussions., (*16)

The list of the awesome people who have contributed to Hybridauth on Github can be found at https://github.com/hybridauth/hybridauth/graphs/contributors, (*17)

License

Hybridauth PHP Library is released under the terms of MIT License., (*18)

For the full Copyright Notice and Disclaimer, see COPYING.md., (*19)

The Versions

09/02 2016

dev-master

9999999-dev https://hybridauth.github.io

Open source social sign on PHP library.

  Sources   Download

MIT

The Requires

  • php >=5.4.0
  • ext-curl *

 

The Development Requires

by Miled

api authentication authorization social oauth google facebook twitter openid