HybridAuth is an open source social sign on php library.
The main goal of HybridAuth library is to act as an abstract api between your application and various social apis and identities providers such as Facebook, Twitter, LinkedIn, Google and Yahoo.
HybridAuth enable developers to easily build social applications to engage websites vistors and customers on a social level by implementing social signin, social sharing, users profiles, friends list, activities stream, status updates and more.
Hello world with HybridAuth:
<?php
$config = dirname(__FILE__) . '/library/config.php';
require_once( "library/Hybrid/Auth.php" );
try{
$hybridauth = new Hybrid_Auth( $config );
$twitter = $hybridauth->authenticate( "Twitter" );
$user_profile = $twitter->getUserProfile();
echo "Hi there! " . $user_profile->displayName;
$twitter->setUserStatus( "Hello world!" );
$user_contacts = $twitter->getUserContacts();
}
catch( Exception $e ){
echo "Ooophs, we got an error: " . $e->getMessage();
}