dev-master
9999999-dev https://hybridauth.github.ioOpen source social sign on PHP library.
MIT
The Requires
- php >=5.4.0
- ext-curl *
The Development Requires
by Miled
api authentication authorization social oauth google facebook twitter openid
Wallogit.com
2017 © Pedro Peláez
Open source social sign on PHP library.
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)
Hybridauth provides a number of basic examples., (*5)
..., (*6)
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();
}
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();
}
Hybridauth depends on few external libraries that come already included in HybridAuth:, (*8)
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
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)
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)
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)
Hybridauth PHP Library is released under the terms of MIT License., (*18)
For the full Copyright Notice and Disclaimer, see COPYING.md., (*19)
Open source social sign on PHP library.
MIT
api authentication authorization social oauth google facebook twitter openid